2010年6月10日星期四

Re: [fw-db] Re: How do I make this SQL search query into a function in /application/models/DbTable folder?

Hello everyone,

im quite new with PHP and Zend so i might be RIGHT...:P

i see that you are not returning anything from your function LISTALBUMS() in model to the controller and then you are using it in your view as FOREACH (which seems to be getting an empty variable)

try adding this line at the end of your model function LISTALBUM

$AlbumsLIST = $stmt->fetchAll();

return $stmt

i hope this solves your problem

Regards,
YD


On Thu, Jun 10, 2010 at 11:44 AM, allergic <im.allergic.2.mailing.lists@gmail.com> wrote:

I forgot to mention the most important clue.  When testing the code in my web
browser it gives me this warning message.

Warning: Invalid argument supplied for foreach() in
/home/Allergic/Desktop/www/akrabat.local/application/views/scripts/index/index.phtml
on line 44

I hope this helps in clarifying my questions and problems.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/How-do-I-make-this-SQL-search-query-into-a-function-in-application-models-DbTable-folder-tp2250013p2250027.html
Sent from the Zend DB mailing list archive at Nabble.com.




--
Regards,
YD

没有评论: