wilburforce
11-01-2006, 04:56 PM
i was given this function but it will not print the words please how do i do it?
also does the ($result = mysql_query($sql) ) need a (;)?
function CheckPrivatePics($userid){
$sql ="SELECT count( catid )
FROM `frm_photos`
WHERE catid =2
AND userid =".$userid;
$result = mysql_query($sql)
if($result > 0){
return "I have private pictures";
}else{
return "I do not have private pictures";
}
}
also does the ($result = mysql_query($sql) ) need a (;)?
function CheckPrivatePics($userid){
$sql ="SELECT count( catid )
FROM `frm_photos`
WHERE catid =2
AND userid =".$userid;
$result = mysql_query($sql)
if($result > 0){
return "I have private pictures";
}else{
return "I do not have private pictures";
}
}