Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

syntax error?


bbyyaa

Recommended Posts

Posted

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'

");

Posted

You pointed out the problem - you have two "WHERE" statements.

 

... ipaddy from orders where WHERE date_purchased between...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...