I get this error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/atridotm/public_html/clientest.php on line 36
No Database Selected
when running this
$db = mysql_connect("localhost", "`123", "456");
if(!$db) {
die('failed to open database');
}
mysql_select_db("atridotm_site");
$result = mysql_query("SELECT client_id , client_name , client_url , client_percom FROM clients WHERE 1 ORDER BY client_id ASC LIMIT 0, 30");
while($row = mysql_fetch_array($result, MYSQL_ASSOC) or die(mysql_error())) {
foreach($row as $name=>$column)
{
echo '<tr><td bgcolor="#003F7D">' . '<a href="' . $row['client_url'] . '">' . $row['client_name'] . '</a></td></tr>' ;
}
}
mysql_close();
Why is it telling me I haven't selected a database?