Jump to content

[SOLVED] What is wrong with this mysql code?


ballhogjoni

Recommended Posts

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/realfina/public_html/findacreditsolution/popular_cards/index.php on line 9

 

$query = mysql_query("SELECT * FROM popular_cards") or die(mysql_error());
$rows = mysql_num_rows($query);

while ($row = mysql_fetch_array($rows)) { // problem line
    echo "ID: ".$row["ID"]." & the code is: ".$row["code"];
}

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.