note 8875 deleted from function.mysql-result by philip
| From: | philip@php.net | Date: | Sat, 19 Jan 2002 20:39:16 +0000 |
| Subject: | note 8875 deleted from function.mysql-result by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25401@lists.php.net to get a copy of this message | ||
here is a simple example of mysql_query and mysql_fetch_array working together.
<?PHP
$login="mylogin";
$pass ="mydbpass";
$db=mysql_connect("localhost",$login,$pass);
mysql_select_db("mydb",$db);
$sql="select * from tutorials";
$result=MySQL_query($sql,$db);
while($myrow=MySQL_fetch_array($result))
{
$tutorial=$myrow["t_name"];
echo "tutorial name is tutorial $tutorial <br>";
}
?>
hope it helps
kill-9