Larry
I am enjoying your very clear instructions but I have run into problems with GII
I am running wamp, all checks out fine, I copy and paste your sql into MYSQL workbench 5.2 to create the two tables,
These are created in a database called testdrive
I used your config guide to ensure the Mysql connection string is correct etc
but in CRUD I get
Class 'employee' does not exist or has syntax error.
and even using proper case as per your example
Model Class *
Class 'Employee' does not exist or has syntax error.
Controller ID *
Base Controller Class *
Controller
Code Template *
default (C:\wamp\www\yiiroot2\framework\gii\generators\crud\templates\default)
My dev environment is Windows 7, Firefox Browser
The interesting thing is that I can see in MYSQL Workbench the two tables BUT it doesnt matter what I do I cannot enforce the capitals you use on the tables so my tables are all lowercase and I suspect the columns too
I have googled for an explanation on how to fix capialisation and the only thing I have picked up is a setting set-variable=lower_case_table_names=0 to 2 and I cannot find this in my.ini at all so included it and have tried all values 0-2 when I use the sql rename table employee to emp and then rename table emp to Employee
nothing changes the case.....
any advice would be welcome
george
Problem With Crud Employee Department - Case
Started by
zubo
, Feb 19 2012 3:40 PM
5 replies to this topic
#1
Posted 19 February 2012 - 3:40 PM
#2
Posted 19 February 2012 - 3:52 PM
I even found this but cannot rename to uppercase
sigh
sigh
#3
Posted 19 February 2012 - 4:01 PM
interesting... I have managed to create Employee in mysql workbench admitedly just with a single column employeeid as key....
but gii still gives me the error.....
so it cannot be case as the problem....
but gii still gives me the error.....
so it cannot be case as the problem....
#4
Posted 19 February 2012 - 4:14 PM
can anyone help me with the application log, to see what it was trying to do
21:09:25.844276 trace system.CModule
Loading "log" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.851540 trace system.CModule
Loading "request" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.855421 trace system.CModule
Loading "urlManager" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.859976 trace system.base.CModule
Loading "gii" module
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.879512 trace system.CModule
Loading "user" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.882555 trace system.CModule
Loading "session" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.889846 trace system.CModule
Loading "db" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.892019 trace system.db.CDbConnection
Opening DB connection
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.904625 trace system.CModule
Loading "clientScript" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.907804 trace system.CModule
Loading "widgetFactory" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.931981 trace system.CModule
Loading "assetManager" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.936292 trace system.CModule
Loading "coreMessages" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13)
21:09:25.844276 trace system.CModule
Loading "log" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.851540 trace system.CModule
Loading "request" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.855421 trace system.CModule
Loading "urlManager" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.859976 trace system.base.CModule
Loading "gii" module
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.879512 trace system.CModule
Loading "user" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.882555 trace system.CModule
Loading "session" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.889846 trace system.CModule
Loading "db" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.892019 trace system.db.CDbConnection
Opening DB connection
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.904625 trace system.CModule
Loading "clientScript" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.907804 trace system.CModule
Loading "widgetFactory" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.931981 trace system.CModule
Loading "assetManager" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13) 21:09:25.936292 trace system.CModule
Loading "coreMessages" application component
in C:\wamp\www\yiiroot2\testdrive\index.php (13)
#5
Posted 20 February 2012 - 5:05 AM
ughhhhhhhhhhh dummy that i am........
missed a step sorry larry..... got so excited I went straight to crud.... should have created the model FIRST ....
now perfect...... excellent......
george
missed a step sorry larry..... got so excited I went straight to crud.... should have created the model FIRST ....
now perfect...... excellent......
george
#6
Posted 20 February 2012 - 9:45 AM
Glad you figured it out and kudos for solving it. Thanks for letting us know.










