Jump to content

[SOLVED] Error:


ryeman98

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/57151-solved-error/#findComment-282406
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/57151-solved-error/#findComment-282411
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.