1

I created db-table like this,

  #   ./zf.sh create db-table TestModel admin

and now I want to delete the TestModel .

How can I delete the db-table created.

and One more question,its also Zend Framework question,

I want to create model(db-table) under the admin module.

like /modules/admin/model/(here)

I tried like this

#./zf.sh create model TestModel admin

but it create model into applications/models

How should I do to create the model into my moduels?

Thanks!

1 Answer 1

1

For the first part: just delete the files you don't want there is currently no way to use Zend_Tool (zf.sh) to remove components.

For your second question try this:

#./zf.sh create model TestModel -m admin

the -m tells the tool you want it to go to a module(this will create e regular model) for a DbTable Model use

#./zf.sh create dbtable TestModel test -m admin
Sign up to request clarification or add additional context in comments.

4 Comments

The full command for create db-table is zf create db-table name actual-table-name module force-overwrite. There is no -m argument
@ Phil I always have to use -m to specify a module it doesn't work otherwise. but you're correct about the thable name. I'll correct the answer
Thank you for your answer! May I ask one more question? How different 'model' and 'dbTable' ?
A DbTable is specific type of model in ZF. It directly relates to a specific table in your Database and by extending Zend_Db_Table_Abstract provides an interface for handling CRUD functions and relationships with that table and parent and dependent tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.