0

Receiving error - Warning: Missing argument 4 for Get_All_Orderlines_Range(), called in /home/download/domains/1ecommerce.com/public_html/dev/_cms/list_orders.php on line 184 and defined in /home/download/domains/1ecommerce.com/public_html/dev/_cms/list_orders.php on line 161

Line 161:

function Get_All_Orderlines_Range($id, $all = "", $from_date, $to_date){
    $sql = "SELECT * FROM orders";
    $sql .= " INNER JOIN orderline on orders.OR_ORDER_NO = orderline.OL_ORDER_NO";
    $sql .= "  WHERE OR_CUSTOMER_ID = '$id'";
    if($all != "ALL"){ 
        if($from_date != "" and $to_date != ""){
            $sql .=" AND (orders.OR_DATE_CREATED BETWEEN '" . $from_date . "' AND '" . $to_date . "')";
        }
    }
    $sql .= " ORDER BY orderline.OL_ORDER_NO";
    //echo $sql;
    return FetchSqlAsObjectArray($sql);
}

Line 184:

$orderlines = Get_All_Orderlines_Range($printed, pack_calendar_date($from_date, "from"), pack_calendar_date($to_date, "to"));

Any help would be reallt appreciated!

3
Contributors
5
Replies
17
Views
2 Years
Discussion Span
Last Post by jonlloydd
1

Do I have to have 4 arguments?

Not if you change the function definition to this:

function Get_All_Orderlines_Range($id, $from_date, $to_date, $all = "")
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.