View Single Post
  #1 (permalink)  
Old 2005-03-26, 01:18 PM
OverRatedLithium OverRatedLithium is offline
Junior Member
 
Join Date: Nov 2004
Posts: 9
OverRatedLithium
Default

My server says mysql_fetch_array has no info, not sure why.

Code:
$link_id = mysql_connect ($dbhost, $dbusername, $dbuserpass);
mysql_select_db("$dbname", $link_id);
$username = "Testfirst12";
$result = mysql_query("SELECT * WHERE first_name=".$username." FROM address_book", $link_id); 
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row
echo $row['first_name']." - ".$row['last_name']. "<br />";
} 
mysql_close($link_id);
Reply With Quote