MrAnthony Posted July 8, 2010 Share Posted July 8, 2010 Hey i really need help on this.... What dose this mean its all that show's on my inventory.php QUERY ERROR: 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 ')' at line 1 Query was SELECT * FROM items WHERE itmid IN(0, 0, ) Any suggestions? Quote Link to comment Share on other sites More sharing options...
ddgamedesign Posted July 8, 2010 Share Posted July 8, 2010 Mine has this (assuming you use default items): $q=$db->query("SELECT * FROM `items` WHERE `itmid` IN({$ir['equip_primary']},{$ir['equip_secondary']},{$ir['equip_armor']})"); Try that out...works fine for my game. The error you posted probably means there's not a properly placed ( or ) somewhere. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 8, 2010 Share Posted July 8, 2010 That error doesnt mean what you said SS :/ It means it doesnt have a 3rd value, in this case, equip_armor Quote Link to comment Share on other sites More sharing options...
ddgamedesign Posted July 8, 2010 Share Posted July 8, 2010 Ah, yes, the blank at the end of the (0, 0, ) Nice spot. :) Quote Link to comment Share on other sites More sharing options...
MrAnthony Posted July 8, 2010 Author Share Posted July 8, 2010 So how do i fix that, Take the Items sql out and then re-add a new one? Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 8, 2010 Share Posted July 8, 2010 No, post the top 3 lines of your inv Quote Link to comment Share on other sites More sharing options...
MrAnthony Posted July 8, 2010 Author Share Posted July 8, 2010 <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $q=$db->query("SELECT * FROM `items` WHERE `itmid` IN({$ir['equip_primary']},{$ir['equip_secondary']},{$ir['equip_armor']})"); Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 8, 2010 Share Posted July 8, 2010 Hmm, go into PHPMyAdmin, click users, check to see if a colomn is called equip_armor Quote Link to comment Share on other sites More sharing options...
MrAnthony Posted July 8, 2010 Author Share Posted July 8, 2010 OMG hahah I feel stupid now ¬_¬ Theres not I'll add it now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.