Question about Arrays

From: Date: Tue, 10 Oct 2006 18:04:38 +0000
Subject: Question about Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-242913@lists.php.net to get a copy of this message
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.

« previous php.general (#242913) next »