|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ascending Columns
I have 2 columns of titles displaying in ascending order but they ascend accross
column1 | column2 can you fly |can't fly get jobs now |Hill I would like it to ascend down col 1 first then col 2, not ascend accross Is there a way to do this? This is what I have now... <?PHP $dbcnx = dbopen(); $columns = 2; $query = "SELECT * FROM help_tbl WHERE posted = 'Y' ORDER BY title "; $result = mysql_query($query); $num_rows = mysql_num_rows($result); echo "<TABLE BORDER="0" width="99%">n"; for($i = 0; $i < $num_rows; $i++) { $row = mysql_fetch_array($result); if($i % $columns == 0) { echo "<TR>n"; } echo "<TD width="50%"><a href="./help.php?show_help=$row[id]">" . $row['title'] . "</a> </TD>n"; if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_rows) { echo "</TR>n"; } } echo "</TABLE>n"; ?> |
|
#2
|
|||
|
|||
|
RE: Ascending Columns
http://codewalkers.com/tutorials/15/3/
|
|
#3
|
|||
|
|||
|
RE: Ascending Columns
Thsnks
OK Just what the doctor ordered |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Ascending Columns |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|