thanx andy--

i put this code on my page and now my whole page is blank.  any clues?

-----Original Message-----
From: Andrew Rush [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 4:14 PM
To: Stinsman, Scott
Subject: Re: [PHP-DB] php/mySQL help

On Wednesday, February 7, 2001, at 04:00 PM, Stinsman, Scott wrote:

> $db=mysql_connect("localhost", "*******", "********"); 
> mysql_select_db("quickcit", $db) OR DIE ("died at connect"); 
> $query = "SELECT DISTINCT Restaurant.Cuisine "; 

notice the addition of the DISTINCT keyword. this will keep this code
useable when you get more than one type of restaurant for each cuisine type

> $query .= "FROM Restaurant "; 
> $query .= "ORDER BY Restaurant.Cuisine ASC "; 

if($result=mysql_query($query, $db) OR DIE ("died at query")) {

        $select="<select name=\"cuisine\">\n";

        while(list($cuisine)=mysql_fetch_array($result)) {      

                $select.="<option value=\"$cuisine\">$cuisine</option>\n";




:: Andrew Rush :: Lead Systems Developer :: :: 
"Crippled but free, blind all the time, i was learning to see" 
- J. Garcia / R. Hunter 
The  views expressed herein are not necessarily those of my employer, but  
they let me have them anyway.

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to