tuna1 Posted April 10, 2007 Share Posted April 10, 2007 Hi, I'v just installed some auction software and have discovered a pretty major flaw. 2 days later and i'm still waiting to hear from customer service so i'm going to try and solve it myself. Here is the error message Warning: implode() [function.implode]: Bad arguments. in /home/wwwmidb/public_html/catlistings.php on line 54 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wwwmidb/public_html/catlistings.php on line 107 I have also attached the PHP file. Now i'm not sure if the problem is something to do with the database, and not the actual PHP file but could someone try and explain the syntax of the errors? Look forward to hearing any replies, James [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/46411-problems-with-understanding-errors/ Share on other sites More sharing options...
wildteen88 Posted April 10, 2007 Share Posted April 10, 2007 The implode error may be caused because you are not passing it an array. implode only accepts an array nothing else. Also make sure you are not feeding it a multidimensional array. I don't think it can process multidimensional arrays. the other error is usually caused because you have an error in your SQL query. To see if your sql query has an error add or die(mysql_error()); to the end of mysql_query function that is near line 107 in catlistings.php Quote Link to comment https://forums.phpfreaks.com/topic/46411-problems-with-understanding-errors/#findComment-225708 Share on other sites More sharing options...
tuna1 Posted April 10, 2007 Author Share Posted April 10, 2007 It seems there is an error in the mysql query. After adding that code i recieve Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wwwmidb/public_html/catlistings.php on line 107 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.addlcategory IN ()) AND a.listin!='auction' AND a.active='1' AND a.clo' at line 2 Do you think there is an easy solution to these problems? Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/46411-problems-with-understanding-errors/#findComment-225723 Share on other sites More sharing options...
fenway Posted April 11, 2007 Share Posted April 11, 2007 Sure... you see the empty IN() clause?> Quote Link to comment https://forums.phpfreaks.com/topic/46411-problems-with-understanding-errors/#findComment-226684 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.