Hey all,
Thanks for the help so far. I have been writing Zend apps for awhile and have seen the database instantiated different ways. Recently, I switched to version 1.10 from like 1.06. Supposedly I should now be able to have zend automatically register the default adapter that is listed in the application.ini file.
using the following code:
Code:
resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.dbname = "yourscene"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.isDefaultTableAdapter = true
from here I should be able to grab the adapter object like so
Code:
$db = Zend_Db_Table::getDefaultAdapter();
for the life of me i can't get this code to run. i get the error that db is not an object when trying to query my database.
does it matter that the DB was NOT created using the cmd line tool??? I already have a mysql database setup... i didn't think that would make a difference...