mysql statements...solved
Posted: Tue Sep 01, 2009 7:02 pm
Hey guys I just have a mysql statement
;
that results in two entries beside eachother when I echo $username.
I need to create another statement that individually handles each entry. My goal is to be able to check the database for the next available user online so I can replace it in the database. I have a count if one of the users is online but will this even work the way I want it to? Any help greatly appreciated?
continued...
Code: Select all
$newuser="SELECT DISTINCT user FROM table WHERE td='$td'";
$query=mysql_query($newuser)
while ($row = mysql_fetch_assoc($query)) {
$username=' '.$row['user'];
that results in two entries beside eachother when I echo $username.
I need to create another statement that individually handles each entry. My goal is to be able to check the database for the next available user online so I can replace it in the database. I have a count if one of the users is online but will this even work the way I want it to? Any help greatly appreciated?
continued...
Code: Select all
$check="SELECT * FROM active_users WHERE username='$username'";
$query4=mysql_query($hostcheck3);
$count = mysql_num_rows($query4);
}