I'm studying and decided to make a CodeIgniter application with backend and frontend for learning purposes and I came across the following doubts. Would you like to get all data from a table in the database and put in an array, after that I would like to display the data in column 2 when the value of column 1 is equal to the value I determine.
To better illustrate what I'll give an example, look at the table below.
ID Option Value
1 site_name Test
2 site_description Example of description site.
3 site_url http://www.example.com
4 site_author John Doe
5 site_lang en
Now let's say I want to display this data on my page within the tag for example I would use the "site_name", for a description of the site would be "site_description" and so on. What would be the best way to do this?
PS: I'm using an ORM Datamapper this application, is there any way to simplify operation using it?