luca
luca

Reputation: 37146

Zend how do I create mysql table programmatically?

I'm building a zend application.I was wondering if I can build mysql tables programmatically without using phpmyadmin.I would want to build them in the act of setting up my web application.If I'm not wrong you can do this in Symfony.

Thanks

Luca

Upvotes: 4

Views: 1732

Answers (3)

Tomáš Fejfar
Tomáš Fejfar

Reputation: 11217

Try

$dbAdapter->query('CREATE TABLE myTable ...');

That should work fine, I guess.

Upvotes: 1

Fatmuemoo
Fatmuemoo

Reputation: 2217

You should look into doctrine.

Lots of info on the web about integrating doctrine with zf. Check out [zend casts for some good tuts. G'luck

Upvotes: 1

Raoul
Raoul

Reputation: 3899

Why not put your schema creation SQL into a file and run it as part of the web app installation?

Upvotes: 0

Related Questions