A specific column is not being inserted when saving a record

后端 未结 2 734
刺人心
刺人心 2021-01-24 07:11

I am working with CakePHP 1.3.13. Here I have writen a code to insert form in to database.

Here, deals database table looks like below.

相关标签:
2条回答
  • 2021-01-24 07:54

    Only those columns/fields will be saved that are present in the cached database table schema, so when adding fields after CakePHP has already cached it, you'll have to clear the cache (delete app/tmp/cache/models) in order for the new columns to be recognized.

    0 讨论(0)
  • 2021-01-24 08:11

    Modifying

    app/Config/core.php 
    Config::write('debug',2); 
    

    Refreshing a page and restoring

    Config::write('debug'); 
    

    to original value will also work.

    0 讨论(0)
提交回复
热议问题