Hello All,
$con=mysql_connect("localhost","user","password");
mysql_select_db("database", $con);
$select="SELECT * FROM table WHERE status=1";
$result=mysql_query($select);
while($row=mysql_fetch_array($result))
{
$r=$row['id']."<BR>";
echo $r;
}
mysql_close($con);
The above code works and displays the results fine.
But if I change status=1 to usr=person I get an error message:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
I tried usr='person', usr="person", and usr=personbut nothing works.
And I need usr=person for my script to work...