I am getting this error. Could you help plzz? thanks
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\Online Services\Apache2\htdocs\searchexample1.php on line 49
line49: while ($row = mysql_fetch_array($result))
[HTML]
[/PHP]
<?php
$sql = ("SELECT * FROM ..... WHERE .....");
$conn = mysql_connect("","") OR DIE (mysql_error());
mysql_select_db("cartonlots", $conn) OR DIE (mysql_error());
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Your query is failing but you didn't bother to check to see if it is failing, you're just going right in to trying to use the query's resource, which isn't a valid resource, because the query failed, so you are getting a warning about the resource not being valid, which is being caused by your query failing, which you are not checking on.