I don't see why not... but you won't be able to create an instance of Zend_Db_Table for a table that doesn't exist.

Regards,
Eric

On Apr 23, 2008, at 4:46 PM, Bill wrote:
Thanks, Eric. In this case, I have to define all table's fields in the query
statement ($db->query('create table (....)'). Can I define the table's
fields in the my My_Table class?

Thank you very much!


On Wed, Apr 23, 2008 at 2:41 PM, Eric Coleman <[EMAIL PROTECTED]> wrote:

Something along the lines of:

$table = new My_Table; // extends Zend_Db_Table
$db = $table->getAdapter(); // returns Zend_Db_Adapter_Abstract object

$db->query('create table...');


On Apr 23, 2008, at 3:51 PM, xing93111 wrote:


Can I use Zend_Db_Table to create a table in a database? If yes, how? If
not,
which API does ZF provide to do so?

Thanks!
--
View this message in context:
http://www.nabble.com/Create-a-new-table-using-Zend_Db_Table-tp16834793p16834793.html
Sent from the Zend Framework mailing list archive at Nabble.com.




Reply via email to