문제

I am trying to create a model through Cake Bake command. I am using windows and II7. I have set up the global variables on the system path so i can do "cake bake" on my Command Prompt.

I have my database config defined in App/config/database.php

Once i do it, i press M for Model, then i select the default database and the console shows this message:

Your database does not have any tables.

And i am not able to create any model for my project.

If i manually create a table on my DB, the error changes and it shows this: http://www.subirimagenes.com/imagen-picture-8000920.html

What's the problem with it? Of course i have no tables if i have just installed Cake!!

도움이 되었습니까?

해결책

First, create your tables with, let's say, phpMyAdmin (localhost/phpmyadmin).

Then, if you have properly configured your database configuration in app/config/database.php you will see Models in your Bake script you can create.

다른 팁

refer below links to get step by step methodology in cake bake

http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html http://www.jamesfairhurst.co.uk/posts/view/baking_with_cakephp

you can also check environment variable settings for this error

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top