title: How do you get multiple fields from a database row?
body: <p>Thanks for reading, I was wondering if anyone knew if there is any way to retrieve multiple fields from a row in a database table automatically. What I mean is something similar to retrieving multiple fields from columns with code like this</p>
  
  <pre><code>    SELECT * 
      FROM table1 
      WHERE column1 LIKE 'info' 
      ORDER BY date_added DESC 
      LIMIT 4
  </code></pre>
  
  <p>My plan is to have four fields in a row, which will not always contain data, and have php code populate tabs.Some pages may only have one tab while others might have four. The problem is each column will probably need a different name. I don't know if this can be done and don't know if I explained it very well. Any input would be appreciated, thank you.</p>
  
  <p>Sorry for not making it clear. I use that line of code for retrieving rows that have 'info' in the 'column1' column limited to four results. I should probably not have added that line of code into this question. What I am trying to do is have an automated system that will retrieve multiple fields from a single row and populate tabs. At present most rows have part of a youtube video code which, using php, gets inserted into the rest of the code on the webpage. What my goal is is to have multiple youtube videos contained in separate tabs fed in from a database. Some rows might only contain one video while others may contain four. </p>
  
  <p>The problem is that I need to have four columns, one for each video, and I think the columns will need different names. My thinking is if there is data in one of the columns then, due to the code, it will contain the word 'youtube' so if I search that column of that row to see if it contains the word 'youtube' and if it does then add it to the webpage. My problem is I am not sure how to repeat that for the other tabs using other columns. If I each separately in each tab then the pages with only one or two youtube videos will have the extra code remaining in the other tabs.</p>
  
  <p>Sorry this probably doesn't make much sense either. Its like the thinking of a madman. As you can probably tell I am not the most experienced man in the world but thanks for reading.   </p>