★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/001730.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  Unable to save result set?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Unable to save result set?
Chrille
Member
posted July 03, 2000 02:54 AM     Click Here to See the Profile for Chrille     Edit/Delete Message Reply w/Quote
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

Shiju Rajan
Member
posted July 03, 2000 04:48 AM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote
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).]

rod k
Member
posted July 03, 2000 05:42 AM     Click Here to See the Profile for rod k   Click Here to Email rod k     Edit/Delete Message Reply w/Quote
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.

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.