SOME INFORMTION about module development

eltche

Joined: 2006-03-14
Posts: 19
Posted: Fri, 2006-03-17 18:05

Hi I am a newbie in module development and I want to develop one..
i'd like to know how can i list some data from my table, i understood how i execute a query
i think with this function "list ($ret, $results) = $gallery->search($query)"; but i don't understant how
to list my result, and how do i do the link with the template files, (for exemple, i have this query
"select * from users" how to display the users)
thanks ! (sorry for my english, i hope you'll understand me !)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 16:09

use $results->nextResult() to get all the results.
populate an array with the data you want to use,
then use $template->setVariable to put that array into the template.
you can then access this data from your *.tpl file.