Re: Query Results Question

From: Date: Wed, 04 Aug 2004 01:23:22 +0000
Subject: Re: Query Results Question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-192644@lists.php.net to get a copy of this message
Richard Thanks firstly for your help. I renamed the fields so the spaces are underscores and amended your query but still receive an error: "not a valid MySQL result resource " Still tinkering though... -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Richard Bewley" <rbewley@eq-sys.com> wrote in message news:php.general-192642@news.php.net... > Hi, > > Take the spaces out of your field names, and then use this: > > <?php > $query = mysql_query("SELECT > id,vacancy_role,vacancy_salary,vacancy_location,vacancy_type FROM > vacancy_details WHERE Public='yes'"); > > while($result = mysql_fetch_array($query)) { > echo "$result[id] - $result[vacancy_role]"; > } > ?> > > ----------------------------------------------------------------- > Thank you, > Richard Bewley > rbewley@eq-sys.com > > Equinox Systems and Development > Website: http://www.eq-dev.com/

« previous php.general (#192644) next »