#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    thane
    Posts
    50
    Rep Power
    0
    dear sirs.
    is there ne way where we can stop the successive iterations more than certain no. of times running on MySQL using PHP..

    like if i'm hosting a webserver supporting PHP+MySQL n one of my customer writes a script like below (may be by mistake)


    <?
    //normal mysql connect statements

    $query="select * from members ";
    $result=mysql_query($query);

    $total_rows=mysql_num_rows($result);

    $counter=0;

    while($counter<$total_rows)
    {

    /* here he is performing lot of mysql statements like fetching evry record frm result */

    /* and alas he forgets to increment counter here */

    }

    ?>


    then this while loop will never end
    is there ne way to stop such kinda things.

    (the same thing happened to me when i forgot to increment counter --then there was lot of overhead on my comp)

    ranjeet
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    6
    Rep Power
    0
    I think you can compile into mysql the amount of processes and cpu time it can take up

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 06:02 PM
  2. Replies: 0
    Last Post: February 12th, 2004, 11:56 AM
  3. Check MySQL Version thru PHP
    By wolftrap1 in forum PHP Development
    Replies: 2
    Last Post: February 11th, 2004, 08:51 PM
  4. Replies: 0
    Last Post: February 2nd, 2004, 05:44 PM
  5. Replies: 0
    Last Post: January 30th, 2004, 01:22 PM

IMN logo majestic logo threadwatch logo seochat tools logo