bbyyaa Posted October 20, 2008 Posted October 20, 2008 Keep saying syntax error but I can't see it. Would appreciate anybody to look at the code. This code is supposed to get all the orders from starting date and ending date (entered before this code). Some where from "WHERE.... is causing the error. $orders = tep_db_query("select customers_id, orders_id, date_purchased, customers_name , cc_owner, customers_company, customers_suburb, customers_email_address, billing_name, billing_street_address, billing_suburb, billing_city, billing_state, billing_postcode, billing_country, customers_telephone, customers_fax, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_state, delivery_postcode, delivery_country, cc_type, cc_number, cc_expires, payment_method, orders_status, ipaddy from orders where WHERE date_purchased between '" . tep_db_input($startdate) . "' AND '" . tep_db_input($enddate) . " 23:59:59' ");
Guest Posted October 20, 2008 Posted October 20, 2008 You pointed out the problem - you have two "WHERE" statements. ... ipaddy from orders where WHERE date_purchased between...
bbyyaa Posted October 21, 2008 Author Posted October 21, 2008 Thank you very much, Sam. I can't believe that I had 2 wheres in it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.