View Full Version : html tables
Nightfire
11-08-2002, 04:49 AM
My brain's fried right now. I can't figure out how to make mysql results show in a html table with two colums, ie
Results1 | Results 2
--------------------------
Results 3 | Results 4
--------------------------
Results 5
etc
Can anyone help? :)
Nightfire
11-08-2002, 05:01 AM
Doesn't matter, I got it :o Realised I was editing the wrong page.
Hehe, the amount of times I've done that. Have even managed to spend some ten minutes editing the [view-source] of an output page trying to debug a parse error and swearing about it not working.
Another one is online debugging and uploading the amended file to a subfolder - refresh page, same error - amend code, upload page to wrong folder again - refresh page, same error, swear etc.
Jeewhizz
11-08-2002, 03:01 PM
Originally posted by Ökii
Another one is online debugging and uploading the amended file to a subfolder - refresh page, same error - amend code, upload page to wrong folder again - refresh page, same error, swear etc.
Oh yeh!!!!!!!!!!!!!!!!!!!!!!11
Nightfire
11-08-2002, 10:06 PM
Now I'm needing help :p
I got this:
$count=0;
echo '<table><tr>';
while ($row=mysql_fetch_array($result)){
$count++;
if ($count == 2){
$count=0;
echo '</tr><tr>';
}
echo '<td>'.$row[username].'</td>';
}
echo '</tr></table>';
When there are no results to be shown, how can I havethe table fill in the <td></td> with &nbsp;?
Also, if the last row only has one result, how can I make it so that cell is colspan="2"?
Nightfire
11-09-2002, 12:47 AM
Nevermind, took a rest from coding and I got it fixed. Such simple things seem like giant obsticles some days :rolleyes:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.