I m retrieve data from a database using the following sql statement:
Code: Select all
sql_query = "SELECT * FROM $table WHERE StartDate <= '$currdate' AND EndDate >= '$currdate' ORDER BY DisplayOrder ASC LIMIT 4";Now, I was wandering if anyone could help in writing array that display the result output from the above sql in the follow way:
I have 2 tables, first table has 2 colums and 1 row, the second table has 1row and 1colum.
I've attempted to write an array that loop the first part of the result and dispays it in the first collum of the first table, then loop to get the second result and display it in the second colum on the first table.
and finally the remaining result in the next table all in ASC order.
If anyone could help I will very much appreciate your help as I seemsnot to get anywhere with my result.
here is my table:
Code: Select all
<table width="600" border="1" cellpading="2" cellspacing="2"><tr><td>cell 1</td><td>cell2</td></tr></table>
<br>
<table width="600" border="1" cellpading="2" cellspacing="2"><tr><td>cell 3</td></tr></table>Many Thanks!
paulng