GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   need php & mysql help quick :) (https://gfy.com/showthread.php?t=51118)

Dawgy 02-17-2002 12:45 AM

need php & mysql help quick :)
 
ok lane is aparently off in the corner wacking off, so is there anyone else here who can help me with a php & mysql question?

basically:

i want to read from a table and display the results in 3 columns. the thing is the table will not always have same number of rows, so i dunno how many to put in each column...

i know there is some way to do this i just cant find it...

help?!

Theo 02-17-2002 12:49 AM

lane got an overdose of food.....

Jade 02-17-2002 12:53 AM

Here is an example of generating a table based on a query to a mysql database using php:

PHP Code:

    echo "<TABLE>";
    echo 
"<TR><TH>Username</TH><TH>Expiration Date</th><TH>Subid</TH><TH>Sub</th></tr>";
    
while (
$row mysql_fetch_array($result)) {
    
$username $row['username'];
    
$active $row['active'];
    
$expirationtime $row['expirationtime'];
    
$email $row['email'];
    
$subid $row['subid'];
    
$sub $row['sub'];

echo 
"<TR><TD>$username</TD><TD>$expirationtime</TD><TD>$subid</TD><TD>$sub</TD></tr>";

}
echo 
"</table>"

Hope that helps!

[Labret] 02-17-2002 12:57 AM

Look at that. 2nd post and someone actually gave you help and not 36 replies of dribble about crabs, sodomy, or whos dialer hold the longest. Has to be a GFY record.

Dawgy 02-17-2002 01:12 AM

Quote:

Originally posted by [Labret]
Look at that. 2nd post and someone actually gave you help and not 36 replies of dribble about crabs, sodomy, or whos dialer hold the longest. Has to be a GFY record.
no shit. i almost feel cheated.


All times are GMT -7. The time now is 12:01 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123