you can try:
Code:
If (!$result) {
...code...
}
Else {
...code...
}
Or
here's an example of some of my code:
Code:
//get results of content query
Public Function ResultsContent($GetAll) {
//open conn to db
$this->OpenDB();
//get results
$result = mysql_query($GetAll);
$num_rows = mysql_num_rows($result);
If($num_rows == 0) {
$this->arrImage[] = array
(
'Data'=>array
(
'ID'=>0,
)
);
}
Else {
while ($row = mysql_fetch_object($result)) {
$this->arrContent[] = array
(
'Data'=>array
(
'ID'=>$row->idkey,
'Content'=>$row->content,
'Tags'=>$row->tags,
'Timekey'=>$row->timekey,
'Title'=>$row->title,
'Type'=>$row->type,
'Date'=>$row->date
)
);
}
}
//close conn to db
$this->CloseDB();
}
where i just set ID=0 you can put: echo "nothing"
hope that helps some 
Shem
Bookmarks