Re: msql_numrows HELP please !!!
| From: | Johannes Janson | Date: | Fri, 06 Apr 2001 17:21:43 +0000 |
| Subject: | Re: msql_numrows HELP please !!! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8321@lists.php.net to get a copy of this message | ||
Hi,
<?php
$dbhost = "yourhost";
$dbuser = "youruser";
$dbpass = "yourpassword";
$dbname = "name_of_DB";
$connection = mysql_connect("$dbhost, $dbuser, $dbpass") or die ("can't
connect");
$database = myslq_select_db($dbname) or die ("can't select DB");
$result = mysql_query("SELECT * FROM yourtable");
while (list($date, $author, $subject, $contents) = mysql_fetch_row($result))
{
code to display the stuff you want referencing to the vars with the
given
vars in the list(...)
}
Johannes
""Bigbosss"" <bpg93@netcourrier.com> schrieb im Newsbeitrag
news:9aket9$i1t$1@toye.p.sourceforge.net...
Hi,
I'm a beginner in PHP dev, and i have find how to connect a DB and select a
TABLE. But i search a example to ahve the numbre of ligne in a rows on my
table.
my table is :
date
author
subject
contents
i want to print each rows with HTML tag like this :
date author
subject
contents
can u help me please ?? thx