July 15th, 2002, 01:24 PM
Always Spell Chek
Join Date: May 2002
Location: NJ, USA
Time spent in forums: 58 m 27 sec
Reputation Power: 12
Selecting row where column value true.
I have a table in MYSQL which contains 4 fields. It is a settings table for my website. I have a title, varname, value, and id field. What I am trying to do is get the value field by calling the varname.
What I would like to include in my template is $setting[title]
I am trying to fetch row values in the same row as the varname which I have named. What is the process I need to be looking into to do this?
1. Connect to database
2. Read Array
3. Get Array Value
4. Compare Array Value to column values in "Varname"
5. If true get "Value" from same row.
6. Return "Value"
7. Format "Value"
Am I right about that and can you tell me if I am expecting the right result using an associative array?
Programming is easy. It's the thinking that's hard.
Search the forums before you ask your question.
PHP | MySQL websites. Visit them, read them, cherish them.
Read the posting rules, before you post.
See if your question has been answered already.