Re: [PHP] Lost in query... Trying to get output from query....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank You Murray's suggestion worked


On Mon, 11 Oct 2004 11:20:57 -0400, John Nichel <john@xxxxxxxxxxxx> wrote:
> GH wrote:
> > Greetings:
> >
> >      I 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);
> 
> 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@xxxxxxxxxxxx
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux