Re: Looping through

From: Date: Mon, 06 Nov 2000 22:48:00 +0000
Subject: Re: Looping through
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4262@lists.php.net to get a copy of this message
Just at first glance it seems that your "Where id = 1" clause is gonna prevent you from getting more than one record at a time, assuming id is a unique field. Anyway, when you want to loop through, do something like: $data_list = mysql_db_query(database, sql); <?while ($data = mysql_fetch_array($data_list):?> Put your HTML in here that you want to loop through for each record. Calling the data like $data["fieldname"] <?endwhile;?> Hope this helps, Joe

« previous php.db (#4262) next »