Select and loop through records???
| From: | Curtis Cole | Date: | Sat, 05 Aug 2000 22:56:28 +0000 |
| Subject: | Select and loop through records??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10278@lists.php.net to get a copy of this message | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Learning PHP</title>
</head>
<body>
<?
$connection = mysql_connect("localhost","username","password") or die
("Unable to connect to MySQL server.");
$db = mysql_select_db("name_of_database") or die ("Unable to select
requested database.");
?>
how do I select all records from a table????????????????
<table>
<tr>
<td>display field 1</td>
<td>display field 2</td>
<td>display field 3</td>
</tr>
how do i display each record????????????????
do while records are not end of file
<tr>
<td>display field 1</td>
<td>display field 2</td>
<td>display field 3</td>
</tr>
records movenenet
loop
</table>