|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-03-25 08:19 UTC] rellig at minad dot de
Description: ------------ I wanted to fetch some lines in a php script via mysqli-prepared-statement and got this error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) I was confused because php reportet that this error occured at bind_result. After some time I figured out that it works when I turn one field with LONGTEXT type to VARCHAR, for example. here is a link to my php-script: http://paste.minad.de/?nid=216 you can look at http://bugs.mysql.com/bug.php?id=52234 too. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
From the link: function news_read($limit = 0) { if($limit == 0) $qry = "SELECT * FROM news ORDER BY n_id DESC"; else $qry = "SELECT * FROM news ORDER BY n_id DESC LIMIT $limit"; echo $qry; $stmt = $this->db->prepare($qry); $stmt->execute(); $stmt->bind_result($n_id,$n_title,$n_note,$n_time,$n_author); while($stmt->fetch()) { $n_ids[] = $n_id; $n_titles[] = $n_title; $n_notes[] = $n_note; $n_times[] = $n_time; $n_authors[] = $n_author; $stmnt->free_result; } $stmt->close(); return array(ids => $n_ids, titles => $n_titles, notes => $n_notes, times => $n_times, authors => $n_authors); }