Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sql assistance


yesudo

Recommended Posts

I am using this query:

 

$customers_query_raw = "select c.customers_id, s.sources_name, c.customers_lastname, c.customers_firstname, c.customers_email_address,

a.entry_country_id from " . TABLE_CUSTOMERS . " c join " . TABLE_ADDRESS_BOOK . " a join " . TABLE_SOURCES. " s join " .

TABLE_CUSTOMERS_INFO. " i on

s.sources_id = c.entry_source_id and i.customers_info_id = c.customers_id and c.customers_id = a.customers_id and c.customers_default_address_id = a.

address_book_id " . $search . " order by i.customers_info_date_account_created desc, c.customers_lastname, c.customers_firstname";

 

Someone else has got this error when using it:

 

1064 - You have an error in your SQL syntax near 'on s.sources_id = c.entry_source_id and i.customers_info_id = c.customers_id and' at line 1

 

select count(*) as total from customers c join address_book a join sources s join customers_info i on s.sources_id = c.entry_source_id and i.customers_info_id = c.customers_id and c.customers_id = a.customers_id and c.customers_default_address_id = a. address_book_id

 

Are there different versions of SQL which work on different syntax ?

Your online success is Paramount.

Link to comment
Share on other sites

  • 1 month later...

Hi,

i'm getting the same error. Are you able to post the code that got it working for you? (assuming you got it working!)

 

THANKS!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...