Thanks very much! it works!
Sincerely, Dani Thomas Holton wrote: > You should be able to use "and" as many times as you want. > You should also make sure that the query you are making below is returning > the number of records you think it should be: > $numrecords = mysql_num_rows($result); > then you can set up a loop to get the results: > while ($i < $numrecords) > { $col_name = mysql_result($result, $i, "column name"); > .. > print "<br>$col_name ..." > $i++; > # for each row > } > > hope this helps. > > .. > > On Sun, 13 Jan 2002, Dani wrote: > > > > > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]