Re: Returning all rows

From: Date: Mon, 20 May 2002 16:16:35 +0000
Subject: Re: Returning all rows
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19276@lists.php.net to get a copy of this message
It needs that line to sort them by city. But it only returns one row "Todd Williamsen" <todd@williamsen.net> wrote in message news:20020520160639.27835.qmail@pb1.pair.com... > I know I have asked this silly question before, but forgive me since I have > been a bit rusty with PHP lately > > So how do I return all rows? > > I have this: > > $sql= "SELECT id, city, date FROM meetings WHERE city = \"$city\" "; > $result = mysql_query($sql,$connection) or die("Couldn't execute query"); > while ($row = mysql_fetch_array($result)) { > $id = $row["id"]; > $city = $row["city"]; > $date = $row["date"]; > } > echo "$date"; > ?> > >

« previous php.db (#19276) next »