Page 1 of 1

Item search fails

Posted: Fri Jan 22, 2010 8:20 am
by Lochrin
When trying to search for specifics (I am after a certain quality aug) .. no matter what i search for i get :

items.php
MYSQL_QUERY
SELECT items.id,items.name FROM items,,,npc_types WHERE (items.ac >= 1) AND (items.hp >= 1)AND .item_id=items.id AND .looTDrop_id=.looTDrop_id AND .loottable_id=npc_types.loottable_id AND npc_types.level<=70 AND (items.classes & 8) AND (items.races & 8) AND (items.slots & 16) AND (items.augtype=8) AND (items.reqlevel>=1) AND (items.reqlevel<=70) GROUP BY items.id ORDER BY items.Name LIMIT 101
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 ',npc_types WHERE (items.ac >= 1) AND (items.hp >= 1)AND .item_id=items.id ' at line 1
Have you sourced the eqbrowser tables in your database ?


across the top of the results screen. Might need a look into.

Re: Item search fails

Posted: Fri Jan 22, 2010 1:33 pm
by Koeril
*See edit below*

I can't replicate the error, please post exactly how you searched (what fields you filled in, etc) so that this can be replicated. Used the error message to put in the fields as I see them, but no matter what I did I couldn't get the error.

Bard, Dwarf, Finger, Aug, slot 8, hp >= 1, ac >=1, level range 1-70 inclusive

For Topsy: Some of the numbers in the query don't match up either to make sense so there could be an issue there? For instance it says race 8 (Dwarf) and class 8 (Bard) so that is a little funky unless the database uses different generic class numbers ... just an idea from an inexperienced web n00b :p

*EDIT* Ok, when I added the "mob dropped" field the error popped up. Setting the field to "merchant sold" also causes the error. Lochrin, just leave that field blank for now and thanks for reporting this! :)

Re: Item search fails

Posted: Fri Jan 22, 2010 4:53 pm
by Topsy
Well looking at it a good portion of that search in items needs to be revisited. Besides some sql injection prevention and some formatting i reallly havent changed much.