Load 100 MYSQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • subzero
    replied
    Name to `name`, `next name`, will deflag your Mysql ;) using that ...

    You can zip database to smaller

    Leave a comment:


  • crazybrumi
    replied
    having fixed error at top still facing same issues i dont understand it

    Leave a comment:


  • spiderwebs
    replied
    Originally posted by crazybrumi View Post
    always making stupid mistakes like that and sql didnt even pick the error up with the 5 mins debug i ran this morning

    Code:
    SELECT * FROM `table` my_gallery
    INNER JOIN `profiles` b
    ON a.`id`=b.`id`
    WHERE b.`approved` = "1"
    hope this will fix your error

    Leave a comment:


  • crazybrumi
    replied
    Originally posted by spiderwebs View Post
    check your sql codes it having error which not selecting exact value as Something_Else has just pointed out
    thats why it keep on loading
    always making stupid mistakes like that and sql didnt even pick the error up with the 5 mins debug i ran this morning

    Leave a comment:


  • spiderwebs
    replied
    check your sql codes it having error which not selecting exact value as Something_Else has just pointed out
    thats why it keep on loading

    Leave a comment:


  • something else
    replied
    "approved" isnt told which table to select it from on this line:
    PHP Code:
    $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."'")); 

    Leave a comment:


  • crazybrumi
    replied
    in terms of the output its is as i want it, however the performance side lets it down, loading 5 images can take 15 seconds or even more that's if it loads, if it doesn't load it will just send MySQL insane to the point i need to restart the service or kill the process.

    thanks for the software, il give that a go, hopefully will be able to fix it tonight.

    Leave a comment:


  • spiderwebs
    replied
    your problem not seems any php debug problem could your more specific with your error?
    you can use DevZone to debug

    Leave a comment:


  • crazybrumi
    started a topic Load 100 MYSQL

    Load 100 MYSQL

    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.

    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>
         &rarr;  <a href=\"./comments.php?id=$item[0]&amp;sid=$sid&amp;who=$who\">Photo Comments</a></p>";
         }else{
        echo"<p align=".align().">There Are No Gallery Pics Atm...</p>";
        }
Working...
X