Entry
In a table with 10 columns how can i found the name of an Empty field in wich i can insert data?
Aug 1st, 2004 05:09
Cinley Rodick, Gath, http://www.generalforums.com , http://www.generalforums.com/yellow/
I got a way, so i share it here...
$checkgroup = mysql($database,"SELECT group_id FROM groups WHERE
user1=0 OR user2=0 OR user3=0 OR user4=0 OR user5=0 OR user6=0 OR
user7=0 OR user8=0 OR user9=0 OR user10=0");
list($checkgroup) = mysql_fetch_row($checkgroup);
for($num=1;$num<=10;$num++)
{
$col = mysql($database,"SELECT user$num FROM groups WHERE
group_id=$checkgroup");
list($col) = mysql_fetch_row($col);
if($col == 0)
{
$user = "user$num";
$num = 11;
};
};
echo "$user";