...

View Full Version : code help please small problem



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";
}
}

Spookster
11-01-2006, 04:59 PM
Change the word return in both instances to the word echo.

homerUK
11-01-2006, 05:03 PM
also does the ($result = mysql_query($sql) ) need a (;)?


yes. it should be $result = mysql_query($sql);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum