I generated a crud app using gii.
Nothing gets saved to the database.
I get no errors.
I have a simple table, id and name.
The screen just blinks and clears the field.
Is this a bug, or am I doing something wrong?
Thanks
Page 1 of 1
gii generated code does not save data mysql tables are not updated
#2
Posted 22 July 2010 - 06:27 AM
Hi
When generating crud the model name is case sensitive. Most likely you have used a lowercase model name as opposed to a proper case model name (i.e. first letter uppercase). This will result in a controller actions looking for a $_POST element with an incorrect name e.g. $_POST[product] as opposed to $_POST[Product]
Regenerate the crud but ensure you use a model name which matches the case of the actual model class
amc
When generating crud the model name is case sensitive. Most likely you have used a lowercase model name as opposed to a proper case model name (i.e. first letter uppercase). This will result in a controller actions looking for a $_POST element with an incorrect name e.g. $_POST[product] as opposed to $_POST[Product]
Regenerate the crud but ensure you use a model name which matches the case of the actual model class
amc
frocco, on 21 July 2010 - 12:19 PM, said:
I generated a crud app using gii.
Nothing gets saved to the database.
I get no errors.
I have a simple table, id and name.
The screen just blinks and clears the field.
Is this a bug, or am I doing something wrong?
Thanks
Nothing gets saved to the database.
I get no errors.
I have a simple table, id and name.
The screen just blinks and clears the field.
Is this a bug, or am I doing something wrong?
Thanks
#3
Posted 22 July 2010 - 07:12 AM
amc, on 22 July 2010 - 06:27 AM, said:
Hi
When generating crud the model name is case sensitive. Most likely you have used a lowercase model name as opposed to a proper case model name (i.e. first letter uppercase). This will result in a controller actions looking for a $_POST element with an incorrect name e.g. $_POST[product] as opposed to $_POST[Product]
Regenerate the crud but ensure you use a model name which matches the case of the actual model class
amc
When generating crud the model name is case sensitive. Most likely you have used a lowercase model name as opposed to a proper case model name (i.e. first letter uppercase). This will result in a controller actions looking for a $_POST element with an incorrect name e.g. $_POST[product] as opposed to $_POST[Product]
Regenerate the crud but ensure you use a model name which matches the case of the actual model class
amc
Thank you so much.
Works great now.
Regards,
Frank
Frank
Share this topic:
Page 1 of 1

Help












