Re: Lost in query... Trying to get output from query....
| From: | John Nichel | Date: | Mon, 11 Oct 2004 15:20:57 +0000 |
| Subject: | Re: Lost in query... Trying to get output from query.... | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-36732@lists.php.net to get a copy of this message | ||
GH wrote:
Greetings:If the query is going to return multiple rows, you need to loop thru the result set... while ( $admin_get_options_result = mysql_fetch_assoc($admin_get_options_results_reference) ) { // do stuff with each row returned } -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.comI am having a problem with trying to get data out of my mySql database.I run my query which works fine and everything... I use: $admin_get_options_query_text = "Select * from adminpage"; $admin_get_options_results_reference = mysql_query($admin_get_options_query_text,$db_access) or die("Admin Get Options: ". mysql_error()); $admin_get_options_result = mysql_fetch_assoc($admin_get_options_results_reference);