It would kill all the cakephp filters and magic at best -----Original Message----- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R. Rajesh Jeba Anbiah Sent: 3. april 2008 14:49 To: Cake PHP Subject: Re: Model find() to return object; instead of array (?)
On Apr 3, 11:51 am, Grant Cox <[EMAIL PROTECTED]> wrote: > I'm not sure of any method - but why do you think that all your rows > as arrays will use up more memory than the same amount of data wrapped > in objects? Is it just a pass by reference vs pass by copy issue? <snip> I'm sorry, I goofed it up with the term "object"; I actually meant "resource". Cake is currently dealing like this: <?php $result = mysql_query('SELECT * FROM foo'); while ($row = mysql_fetch_assoc($result)) { $array[] = $row['foo']; } //<--- // And, in view foreach($array as $x) { echo $x; } ?> I want something like: <?php $result = mysql_query('SELECT * FROM foo'); //<--- // And, in view while ($row = mysql_fetch_assoc($result)) { echo $row['foo']; } ?> -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---