Jump to content

Error in Retrieving Data out of Database


ekuemoah

Recommended Posts

I have information in a php database. I want to retrieve it. The fields are text or memo fields meaning it can hold a lot of data. I got this error. When I retrieve the data, it only gives me the first record. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in C:\Users\Public\EasyPHP-5.3.6.1\www\phptests\AccountingClass\PrintOutScript.php on line 19 What does this mean and what can I do about it? Thank You Also, i retrieved the first row of data but don't know how to print it out on my page.Here's the script I usedif($choice ='review'){$result=mysql_query("SELECT `Question` FROM `reviewquestions`");$row=mysql_fetch_array($result);//echo($row[1]);}

Link to comment
Share on other sites

1) Echo is commented out, so you are going to get nothing.2) in your MySql query you have to refer to your DB connection. Ex-

$result_set = mysql_query("SELECT * FROM table WHERE user = {$user}, $connection);

Link to comment
Share on other sites

php has 128mb of memory by default for max memory allocation. Which is quite large. The error means that php hcant allocate more memory anymore. Post the exact code so that we can take a look into it. how many rows it is returning? what datat types of the column question? you can try also using mysql_free_result() to free up result resource.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...