Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 sqo error


Guest

Recommended Posts

Hello,

If anybody has an idea how to solve this error, I think is a genius. I try to search an answer to this error but i have find nothing to help me.

 

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 10000' at line 50

 

SELECT manuf.manufacturers_Name AS manufacturer, prd.products_id AS id, prd.products_id AS mpc, prd.products_model AS model, prd.products_quantity AS qty, prdsc.products_Name AS name, prdsc.products_description AS description, prd.products_price AS price, prd.products_image AS image, prd.products_weight AS weight, prd.products_status AS status, prd.products_date_available AS date_available, prd.products_last_modified AS last_modified, prd.products_tax_class_id AS tax_id, catdescparent4.categories_Name AS parent4_cat, catdescparent3.categories_Name AS parent3_cat, catdescparent2.categories_Name AS parent2_cat, catdescparent1.categories_Name AS parent1_cat, catdesccurrent.categories_Name AS current_cat, catdescparent4.categories_id AS parent4_id, catdescparent3.categories_id AS parent3_id, catdescparent2.categories_id AS parent2_id, catdescparent1.categories_id AS parent1_id, catdesccurrent.categories_id AS current_id FROM (categories , products prd, products_description AS prdsc, categories_description AS catdesccurrent, products_to_categories AS prdtocat) LEFT JOIN categories_description AS catdescparent1 on ( catdescparent1.categories_id = categories.parent_id AND catdescparent1.language_id = '1' ) LEFT JOIN categories AS cat2 on ( cat2.categories_id = categories.parent_id ) LEFT JOIN categories_description AS catdescparent2 on ( catdescparent2.categories_id = cat2.parent_id AND catdescparent2.language_id = '1' ) LEFT JOIN categories AS cat3 on ( cat3.categories_id = cat2.parent_id ) LEFT JOIN categories_description AS catdescparent3 on ( catdescparent3.categories_id = cat3.parent_id AND catdescparent3.language_id = '1' ) LEFT JOIN categories AS cat4 on ( cat4.categories_id = cat3.parent_id ) LEFT JOIN categories_description AS catdescparent4 on ( catdescparent4.categories_id = cat4.parent_id AND catdescparent4.language_id = '1' ) LEFT JOIN manufacturers AS manuf ON ( manuf.manufacturers_id = prd.manufacturers_id ) WHERE ( prd.products_id = prdsc.products_id AND prdsc.language_id = '1' ) AND prd.products_id = prdtocat.products_id AND prdtocat.categories_id = categories.categories_id AND ( catdesccurrent.categories_id = categories.categories_id AND catdesccurrent.language_id = '1' ) AND prdtocat.categories_id in () LIMIT 10000

 

 

 

 

Thank you in advance if you really know what's the answer to this issue.

Link to comment
Share on other sites

 

 

Thank you so much , I try that but did not work, I still have the same error.

I have no idea why is not working. I wish I knew how to read this PHP language

Link to comment
Share on other sites

I wish I knew how to read this PHP language

 

The code you gave is purely an SQL query (built in PHP). Looking it over, I see something suspicious in the very last line: AND prdtocat.categories_id in (). MySQL is being asked to check if a field is found in a list, but that list is empty! Anyone know if this is legitimate, and whether 'true' or 'false' should be returned if it is? It's 3:02 in the morning right now and I need to go to bed, but I'd wonder if PHP should be building the query to include such a list reference if the list is empty? Anyone want to pick this up, until I get a chance to return to the code in 18 hours or so?

Link to comment
Share on other sites

The code you gave is purely an SQL query (built in PHP). Looking it over, I see something suspicious in the very last line: AND prdtocat.categories_id in (). MySQL is being asked to check if a field is found in a list, but that list is empty! Anyone know if this is legitimate, and whether 'true' or 'false' should be returned if it is? It's 3:02 in the morning right now and I need to go to bed, but I'd wonder if PHP should be building the query to include such a list reference if the list is empty? Anyone want to pick this up, until I get a chance to return to the code in 18 hours or so?

This is a multiple poster with who knows what.

Link to comment
Share on other sites

florentina123123, there should be some other information in the vicinity of this error message, including the routine and approximate line number. That, along with the version of osC you're at, would give us some idea of what code generated this query and thus be able to figure out why the "IN" list was empty. I tried looking for this code in the standard osC, and couldn't find it, so it may be from a contribution/mod/add-on.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...