Re: Print ONCE ONLY?????

From: Date: Sat, 12 Jan 2002 23:21:45 +0000
Subject: Re: Print ONCE ONLY?????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80322@lists.php.net to get a copy of this message
move the following inside your while loop echo "$row[item_id]","<BR>"; ----- Original Message ----- From: "Dani" <universal2001@iprimus.com.au> To: "PHP LIST" <php-general@lists.php.net> Sent: Saturday, January 12, 2002 8:54 PM Subject: [PHP] Print ONCE ONLY????? > > Hi Again! > > Why does this print only one record? > > 1. I have checked on the table on MYSQL and I have 2 records with this > data. > 2. Can I actually use the word "and" twice or three times for filtering > the data that I need during query?? (example: $query = "select * from > main_table where item_type = 'hotel' and class = 'melati' and price = > '200' and facilities = 'swimming pool' " > > Could some body help please??? > > here is my code > > ... > $query = "select * from main_table where item_type = 'hotel' and class = > 'melati'"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo "$row[item_id]","<BR>"; > while ($row = mysql_fetch_array($result)) > { > echo "WHILE > RESULT","$row[item_type]","<BR>","$row[class]"; > } > > > thank you again! > > regards, > Dani > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#80322) next »