mysql_fetch_array(): supplied argument is not a valid MySQL result

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a3590170/public_html/oms/Products.php on line 21

[php]<?php
$con = mysql_connect("***************","******","******");
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}

mysql_select_db(“a3590170_osm”, $con);

$result = mysql_query(“SELECT * FROM osm”);

echo "

";

while($row =mysql_fetch_array($result))
{
echo “

”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
}
echo “
ProductID ProductName Description Price Location
” . $row[‘ProductID’] . “” . $row[‘ProductName’] . “” . $row[‘Description’] . “” . $row[‘Price’] . “” . $row[‘Location’] . “
”;

mysql_close($con);
?> [/php]

I am very new to this and can’t work it out? Any ideas?

I noticed in the url that you there is /oms/ and in your query you use “osm”.
Seems like a long shot and it’s a complete guess but should your query be…

[php]
“SELECT * FROM oms”
[/php]

Did you solve this issue or are you still having problems?

Sponsor our Newsletter | Privacy Policy | Terms of Service