View Full Version : code help please small problem

11-01-2006, 05: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";
return "I do not have private pictures";

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

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

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