Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

I'm trying to get the 'Dropdownlist' contribution installed and I'm getting a SQL syntax error. could someone please have a look and see if they can spot the error.

 

The error I'm getting is this

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

 

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

 

This is the query that is causing the problem

$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 on s.sources_id = c.entry_source_id and c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname asc, c.customers_firstname";

 

If anyone could shed some light on this it would be most appreciated.

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...