Warning: Supplied argument is not a valid MySQL result resource in /usr/local/psa/home/vhosts/domain.com/httpdocs/mysqlinfo.php on line 11
Here's my code, can you tell me what is wrong? Thank you.
Code: Select all
<?php
$linkID = mysql_connect("localhost", "username", "passwprd");
mysql_select_db("dbname", $linkID);
$resultID = mysql_query("SELECT * FROM customer", $linkID);
print "<table border=1><tr><th>Customer ID</th>";
print "<th>First Name</th><th>Last Name</th></tr>";
while ($row = mysql_fetch_row($resultID))
{
print "<tr>";
foreach ($row as $field)
{
print "<td>$field</td>";
}
print "</tr>";
}
print "</table>";
mysql_close($linkID);
?>