Hi,
i start to study zend framework and i read any tutorials.

I'don't understand how do a query in mysql db.

i configure the application.ini with the params db:

resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = root
resources.db.params.password = root
resources.db.params.dbname = news


My db:

table news

 id  title description date author


I would to do:

in the home page i show the news list.

In the model folder i create a News.php file with the function:

public function getAllNews()
        {
                  
                $sql = 'SELECT * FROM news ORDER BY data DESC';
         }

but can i connect to my db for the query?


thanks.







-- 
View this message in context: 
http://www.nabble.com/applicationi.ini-and-connect-to-db-tp23740320p23740320.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to