$mysql = "SELECT id, tier_level, tier_item_name, tier_item_brand
FROM cover_tiers
WHERE 1";
$sql = @mysql_query($mysql);
echo $sql;
if (!mysql_query($sql)) {
exit('<p>Sorry, the query did not work. ' . mysql_error() . '</p>');
}
The echo returns “Resource id #5”
A warning says, “mysql_query() expects parameter 1 to be a string, resource given in […] on line 48”
Line 48: if (!mysql_query($sql)) {
Performing the query inside phpMyAdmin (just copy/paste the code) returns all the table contents perfectly, so why doesn’t it work on the page?
Thanks,
Steve