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

    Join Date
    Jan 2000
    Location
    Sweden
    Posts
    384
    Rep Power
    15
    Hello all,

    Does anybody know why this does´nt work?

    <?
    $y = 2;

    $mysql = mysql_query ("SELECT * FROM statsMonth WHERE month='$y'");
    if ($rad = mysql_fetch_array($mysql)) {
    do {

    $kategorinamn=$rad["namn"];
    $kategoriid = $rad["id"];

    echo "OK<br>";

    } while($rad = mysql_fetch_array($mysql));
    }?>

    It says that it was unable to save the result set...
    Maybe the problem is that the table have over 17000 records?

    Please help!

    Best regards,
    Christoffer Andersson
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    code seems fine except "$mysql" variable.(i think that might be a database variable or keyword.we can't use it.i am not sure .. but any way just give a try).

    one more thing ,you have missed a '=' sign in the end of the loop.

    <?
    $y = 2;

    $sql = mysql_query ("SELECT * FROM statsMonth WHERE month='$y'");
    if ($rad = mysql_fetch_array($sql)) {
    do {

    $kategorinamn=$rad["namn"];
    $kategoriid = $rad["id"];

    echo "OK<br>";

    } while($rad ==mysql_fetch_array($sql));
    }?>

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."



    [This message has been edited by Shiju Rajan (edited July 03, 2000).]
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    No, you don't need == in the while, you've done that correctly. I believe the problem is available RAM. Try increasing the limit in php.ini (assuming the machine has enough RAM available.

Similar Threads

  1. letting the user set and save default value
    By Bigtallim in forum Visual Basic Programming
    Replies: 4
    Last Post: February 17th, 2004, 01:16 PM
  2. longest result set
    By mathiasd in forum MySQL Help
    Replies: 9
    Last Post: January 25th, 2004, 11:51 AM
  3. Combo boxes created matched to result set
    By TuxLives in forum PHP Development
    Replies: 3
    Last Post: January 10th, 2004, 11:48 PM
  4. Access succesive rows of result set
    By TuxLives in forum PHP Development
    Replies: 2
    Last Post: January 10th, 2004, 11:46 PM
  5. using temp var to group result set?
    By h3r2on in forum PHP Development
    Replies: 3
    Last Post: January 8th, 2004, 01:27 PM

IMN logo majestic logo threadwatch logo seochat tools logo