ryeman98 Posted June 25, 2007 Share Posted June 25, 2007 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/4617/domains/sunnyneo.com/html/admin/customisation/index.php on line 355 Line 355: while($row4 = mysql_fetch_array($editclothing)) { Help? Quote Link to comment Share on other sites More sharing options...
.Stealth Posted June 25, 2007 Share Posted June 25, 2007 Well whats in $editclothing? Gonna need more info than that! Quote Link to comment Share on other sites More sharing options...
ryeman98 Posted June 25, 2007 Author Share Posted June 25, 2007 True. Sorry. $editclothing = mysql_query("SELECT * FROM CustomisationClothing WHERE name='$name'"); Quote Link to comment Share on other sites More sharing options...
Pastulio Posted June 25, 2007 Share Posted June 25, 2007 all I can think of is a syntax error $editclothing = mysql_query("SELECT * FROM CustomisationClothing WHERE name='$name'"); should be: $editclothing = mysql_query("SELECT * FROM `CustomisationClothing` WHERE `name`='$name'"); Quote Link to comment Share on other sites More sharing options...
ryeman98 Posted June 25, 2007 Author Share Posted June 25, 2007 all I can think of is a syntax error $editclothing = mysql_query("SELECT * FROM CustomisationClothing WHERE name='$name'"); should be: $editclothing = mysql_query("SELECT * FROM `CustomisationClothing` WHERE `name`='$name'"); Nope, didn't work. Quote Link to comment Share on other sites More sharing options...
ryeman98 Posted June 25, 2007 Author Share Posted June 25, 2007 When I take out the mysql_fetch_array() it works fine... Quote Link to comment Share on other sites More sharing options...
Pastulio Posted June 25, 2007 Share Posted June 25, 2007 Then I don't know but what I do know is, that you shouldn't be using a while loop because you'll have only one result anyway (well that's what your code looks like), so you could just make it like this $query = "SELECT * FROM `CustomisationClothing` WHERE `name`='$name'"; $result = mysql_query($query); $row = mysql_fetch_array ($result); I don't know why but when I code it like that it always works for me, unless the table you are looking for does not exist. Quote Link to comment Share on other sites More sharing options...
ryeman98 Posted June 25, 2007 Author Share Posted June 25, 2007 It's showing the page now but still has that error... :-\ Quote Link to comment Share on other sites More sharing options...
Pastulio Posted June 25, 2007 Share Posted June 25, 2007 Maybe you are not connected to the database, or the right one or something? Because it should always find a valid result if the table exists, even if there are no rows in it. So do a routine check for any typo's or other bugs. Because, when PHP shows an error on a line, your problem could also lie in a different portion of your code 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.