[CS-FSLUG] Looking for tips(Goal achieved)

David M. dave at edificationweb.com
Fri Jul 2 13:29:19 CDT 2004


On Friday 02 July 2004 01:42 pm, K Montgomery wrote:

This wasn't so hard, just had to put on my thinking cap and keep trying to 
bring back as much as I can from not coding for several months.
Here's what I came up with. it's working, but I need to change it slightly so 
I don't have to query each row individually.

mysql_select_db('testing');
$myquery = "SELECT * FROM phpstore";
$result = mysql_query($myquery);
while ($row = mysql_fetch_array($result)){
$user=$row[0];
if (!empty($user)){
echo '<table border=2>
<tr><td>' . $row[0] . '</td></tr></table>'; 
}
else{
echo "";
}
}

if row 0 is not empty it displays the contents along with the table, if it's 
empty the table dissapears and everything automatically moves to fill the 
void.

Coooooooooooooooooooooooool!
Far Out!

Im so happy... I learned something.
-- 
David M.




More information about the Christiansource mailing list