note 12871 deleted from function.mysql-fetch-row by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 20:52:16 +0000 |
| Subject: | note 12871 deleted from function.mysql-fetch-row by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134215@lists.php.net to get a copy of this message | ||
Note Submitter: doug at melonn dot com
----
you can also use mysql_fetch_row() like this if you want to display inumerable results the same way:
#connect to the server and select db
mysql_connect("host","username","pass");
mysql_select_db("dbname");
#query the db
$query = "SELECT * FROM table";
$result = mysql_query($query)
or die(mysql_error());
#display results
while($i = mysql_fetch_row($result)) {
echo $i[0];
echo $i[1];
.....
}
and so forth...