Ok ... so I can do it this way (below), but there must be a more intelligent way? This 
is like something I did with my Vic20, 19 years ago. (If you ever had a Vic20 ... :) 
you might sympathise)

while ($mydata = mysql_fetch_object($news))
{
if ($mydata->StudentId = $StudentId)
{$found =1}else{$found=0}
}

if ($found==1){do this}else{do that}



> $myconnection = mysql_connect($server,$user,$pass);
> mysql_select_db($db,$myconnection);
>
> $news = mysql_query("select StudentId FROM $table");
>
> while ($mydata = mysql_fetch_object($news))
> {
> }
>
> if exists
>         {do this}else{do that}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to