On 16 Sep 2009, at 12:55, aoohralex wrote:
Based on Yours instructions how to connect to database:
http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.connecting.factory-config
I have:
$config = new Zend_Config(
array(
'database' => array(
'adapter' => 'Mysqli',
'params' => array(
'host' => '127.0.0.1',
'dbname' => 'test',
'username' => 'webuser',
'password' => 'secret',
)
)
)
);
$db = Zend_Db::factory($config->database);
And what ? What should I do with this ? Where should I place it ?
A standard strategy is to store your DB adapter in the registry
(Zend_Registry) thus making it available to your application. (Someone
will tell me that's outdated now, but it will get you started.)
[... stuff about Symfony...]
In ZF I don't know - so maybe somebody should write about that in
tutorial
and tell me ? Because I don't know.
Sorry your finding it difficult to get going. Zend Framework is
complicated (and many find it so when beginning -- I know I did -- and
see the other thread going on right now). The trouble is writing
software is itself complicated. Famously there's no silver bullet, and
Zend Framework certainly isn't it. Alas, you just have to take on the
learning curve and persevere.
Rob Allen has a good tutorial (and book) that's recently been updated:
http://akrabat.com/zend-framework-tutorial/
Padraic Brady has an online book that you can check out:
http://www.survivethedeepend.com
There really are MANY tutorials available. As ever, Google is your
friend. People on the mailing list are very good at answer specific
questions.
I hope that helps.
Regards,
Carlton