Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I'm new to PHP and I'm trying to simply output something from a database.
Here is my code:
<?php
mysql_connect("localhost:3306", "devnullx_user", "thatguy1") or die (mysql_error ());
mysql_select_db("devnullx_mycrosoft") or die(mysql_error());
$strSQL = "SELECT * FROM devnullx_mycrosoft";
$result = mysql_query($strSQL);
while($row = mysql_fetch_array($result)) {
echo $row['Username'] . "<br />";
}
mysql_close();
?>
And here is the error I am getting: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/devnullx/public_html/db.php on line 6
I don't really understand PHP the most but I am trying to learn if you help.
thanks.