ekuemoah Posted February 20, 2012 Share Posted February 20, 2012 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 More sharing options...
Krewe Posted February 20, 2012 Share Posted February 20, 2012 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 More sharing options...
[dx] Posted February 20, 2012 Share Posted February 20, 2012 As far as I know db selection is done with mysql_select_db(). How many RAM do you have?? Link to comment Share on other sites More sharing options...
birbal Posted February 20, 2012 Share Posted February 20, 2012 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.