Re: listing

From: Date: Thu, 23 Aug 2001 19:39:53 +0000
Subject: Re: listing
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-11751@lists.php.net to get a copy of this message
I think what you want is <?php $query = "Select * from companies"; if( !($dbq = mysql_query($query,$dblink))) { echo "Error querying database."; exit; } while( $row = mysql_fetch_array ($dbq) ) { ?> <table> <tr> <td> <?php // php code to output your entry information ?> </td> </tr> </table> <? } ?> Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com ----- Original Message ----- From: "Andrius Jakutis" <andrius@internetmedia.lt> To: <php-db@lists.php.net> Sent: Thursday, August 23, 2001 11:22 PM Subject: Re: [PHP-DB] listing > This gives 25 the same entries. I need to list all entries from the table, > but with loop. > > More solutions? > > > "Chris Hobbs" <chobbs@silvervalley.k12.ca.us> wrote in message > news:3B854E6D.1020107@silvervalley.k12.ca.us... > > Something like: > > > > <? for($i=1; $i<25; $i++) { ?> > > <table> > > <tr> > > <td> > > <? > > // php code to output your entry information > > ?> > > </td> > > </tr> > > </table> > > > > <? } ?> > > > > Andrius Jakutis wrote: > > > > > Hello again, > > > > > > Is there oportunity to write this: > > > > > > <some php command to loop entries, the way is written bellow> > > > HTML php coding.+ MYSQL - 1 entries information > > > <end of loop> > > > > > > Something like that: > > > > > > <here loop begins> > > > <table> > > > <tr> > > > <td> > > > first entry information from table "companies" (name, telephone...) > > > </td> > > > </tr> > > > </table> > > > <loop ends> > > > > > > > > > > > > THanks. > > > > > > > > > -- > > > Su pagarba, > > > > > > Andrius Jakutis > > > InternetMedia > > > http://www.internetmedia.lt > > > GSM: 370 82 31332 > > > > > > > > > > > > > > > > > > > > > -- > > Chris Hobbs Silver Valley Unified School District > > Head geek: Technology Services Coordinator > > webmaster: http://www.silvervalley.k12.ca.us/~chobbs/ > > postmaster: chobbs@silvervalley.k12.ca.us > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#11751) next »