hi guys, having a bit of troule regarding load. is there any debug for php that could maybe step in when it doesnt like something like vb.
heres there code any ideas would be appreciated.
heres there code any ideas would be appreciated.
Code:
$sex='m'; if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM my_gallery a INNER JOIN profiles b ON a.uid=b.uid WHERE approved=1 AND b.sex='".$sex."'")); $num_items = $noi[0]; $items_per_page= 4; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages;$limit_start = ($page-1)*$items_per_page; $items=mysql_query("SELECT a.id, a.path, b.sex FROM my_gallery a INNER JOIN profiles b ON a.uid=b.uid WHERE a.approved=1 AND b.sex='".$sex."' ORDER BY a.id DESC LIMIT $limit_start, $items_per_page"); if(mysql_num_rows($items)>0) while ($item = mysql_fetch_array($items)){ $filename=explode(".",$item[1]); $nick1=explode("/",$item[1]); $nick=explode("(",$nick1[5]); echo"<p align=".align()."><img src=\"$item[1]\" width=\"150\" height=\"150\" alt=\"$item[0]\"/></br> → <a href=\"./comments.php?id=$item[0]&sid=$sid&who=$who\">Photo Comments</a></p>"; }else{ echo"<p align=".align().">There Are No Gallery Pics Atm...</p>"; }
Comment