0

Hi everybody!
I'm having some problems and hope to get help in this forum.
My website name is SNIP. At this time it is setup as coins website. I'm trying to reinstall original categories to make it a full auction site. When I ran SQL dump file that was given to me by the support people, I had no errors. But if you go to my website and point to categories, there are no names there, and when you click on any of the categories, you will get this error:

A Mysql error has occurred while running the script:

The query you are trying to run is invalid
Mysql Error Output: 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 ') OR a.addl_category_id IN ())' at line 2
SQL Query: SELECT count(*) AS count_rows FROM probid_auctions a WHERE a.active=1 AND a.approved=1 AND a.closed=0 AND a.deleted=0 AND a.list_in!='store' AND a.catfeat='1' AND (a.category_id IN () OR a.addl_category_id IN ())

Please, if anyone knows what to do here, help me fix this problem.
Thanks in advance!

Edited by happygeek: link snipped

3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by maliy0
0

Hi,

...AND (a.category_id IN () OR a.addl_category_id IN ())

IN() can not be empty. It needs at least one element, for example: ..AND (a.category_id IN(10) OR a.addl_category_id IN(100, 200, 300)), datatype integer assumed.

-- tesu

Edited by tesuji: n/a

0

Hi MaliyO, nice to meet you :)
I'm sure you'll find help here.

Hi. Is this line ""AND (a.category_id IN () OR a.addl_category_id IN ())"" supposed to be in the dump file?? I don't see it in there

Edited by maliy0: n/a

0

Hi. Is this line ""AND (a.category_id IN () OR a.addl_category_id IN ())"" supposed to be in the dump file?? I don't see it in there

Well, I understand. What do you think of reading your own text more carefully? This is what you posted in one day ago:

A Mysql error has occurred while running the script:

The query you are trying to run is invalid
Mysql Error Output: 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 ') OR a.addl_category_id IN ())' at line 2
SQL Query: SELECT count(*) AS count_rows FROM probid_auctions a WHERE a.active=1 AND a.approved=1 AND a.closed=0 AND a.deleted=0 AND a.list_in!='store' AND a.catfeat='1' AND (a.category_id IN () OR a.addl_category_id IN ())

Please, if anyone knows what to do here, help me fix this problem.
Thanks in advance!

To save you from getting overworked by yourself I tried to expose the cryptic letters in question by highlighting them reddishly.

-- tesu

Edited by tesuji: n/a

0

Tesu. I do not need your smart ass comments, I know what I posted. This line AND (a.category_id IN () OR a.addl_category_id IN ())
does not exsist in the dump file.
Is there a program that runs sql files for errors?

0
The query you are trying to run is invalid
Mysql Error Output: 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 ') OR a.addl_category_id IN ())' at line 2
SQL Query: SELECT count(*) AS count_rows FROM probid_auctions a WHERE a.active=1 AND a.approved=1 AND a.closed=0 AND a.deleted=0 AND a.list_in!='store' AND a.catfeat='1' AND (a.category_id IN () OR a.addl_category_id IN ())

Sorry, you posted the above code. Mysql said "You have an error in your SQL syntax;". Then the erroneous select statement follows. Moreover, it points to the error: ') OR a.addl_category_id IN ())' at line 2.

And indeed, the parameter list of IN operator is empty. This is a severe error. This error doesn't have anything to do with the dump file you might have gotten to insert your data in database.

This error has been initiated by your website. When you click categories, assumingly a combo or list box, the above sql statement is dynamically generated and sent to your database for executing through Mysql. Mysql rejects execution because of empty IN operator parameter list. Again, the condition (a.category_id IN () OR a.addl_category_id IN ()) is wrong. A correct condition should look like (a.category_id IN (10,20) OR a.addl_category_id IN (1,2,3, etc)). This is a mere example. Obviously, the php program behind your website does not fill in data (e.g. 10,20 or 1,2,3 etc) correctly when clicking on categories for some reasons .

There could be various reasons for this error, for example, the database table (I don't know which one) from where the values were read to fill the parameter list of IN operator doesn't have rows or more likely these missing values were tried to read from an internal php array which is empty, also a configuration file (text, xml) might not exists or empty etc. You may study the php code of your website to find out where above select statement is generated.

I think we were talking at cross purposes because I didn't put any importance on your words "in dump file" for the error, these empty IN() operator list was completely clear to me and I myself couldn't understand that you didn't catch this meaning.

I hope this clears the matter up something.

-- tesu

Edited by tesuji: n/a

0

Tesu.
Thank you for a great explanation, but I still think there is a problem in the file.
I have another dump file that is only for coin categories, and after I upload this file, everything works as it should without any errors. But when I install this full categories dump file, clicking on categories result in error in SQL syntax.
Thanks for trying to help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.