Question about Arrays

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

 



Hi List.
I have a table, which contains 'setting' information for my website.
The table has the following columns: setting_id, setting_name and setting_value. Now there are currently 30 settings stored in this table, however i am having trouble pulling values out on a 'as needed' basis.

At the moment i have this select query:
    $settings_query = "SELECT * FROM `robin_settings`";
    $settings_result = mysql_query($settings_query);

And from that, i would like to pull individual results, for example...

I have a setting which has a 'setting_id' of "4", a 'setting_name' called "banner_on" and a 'setting_value' of "1".

How am i able to pull that information from the results i get?

I know i could pull it by putting a WHERE clause on the SQL query, however that would mean having 30 select queries per page and i don't really fancy that!

Thanks for any help! (i'm new at this :) )

Alex.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux