Met with a very wonderful problem,
That was the original.
$data = compact('id', 'name', 'status', 'add_time');M('table')->add($data);
Then I add the Save field
$data = compact('id', 'name', 'status', 'add_time' 'location', 'article_link');M('table')->add($data);
The problem comes out: I print $data,location and article_link have value, but the last SQL statement that was printed after add does not have their value in the location.
Solve doubts?
Reply content:
Met with a very wonderful problem,
That was the original.
$data = compact('id', 'name', 'status', 'add_time');M('table')->add($data);
Then I add the Save field
$data = compact('id', 'name', 'status', 'add_time' 'location', 'article_link');M('table')->add($data);
The problem comes out: I print $data,location and article_link have value, but the last SQL statement that was printed after add does not have their value in the location.
Solve doubts?
Delete the ~runtime directory to try, TP will cache the database table fields, if there is no location and Article_link field when generating the cache, it will ignore the assignment of these two fields