ThinkphpSAE database operation D method problems the local database originally had a mesg table, and then added a field maid after the table. Use & nbsp; $ mesgD (Mesg); & nbsp; dump ($ mesg) in an operation. The model contains protected $ _ maparray (user & gt; muser thinkphp/SAE/database operation/D method problems
The local database originally had a mesg table, and a maid field was added to the table.
Use
$ Mesg = D ('mesg ');
Dump ($ mesg );
The models include:
Protected $ _ map = array (
'User' => 'muser ',
'Content' => 'mcontent ',
'Time' => 'mtime ',
'Aid '=> 'Maid ',
);
The result contains the following:
["Fields: protected"] => array (8 ){
[0] => string (3) "mid"
[1] => string (4) "muid"
[2] => string (5) "muser"
[3] => string (8) "mcontent"
[4] => string (5) "mtime"
[5] => string (4) "maid" // This
["_ Autoinc"] => bool (true)
["_ Pk"] => string (3) "mid"
}
The maid field exists locally.
However, the result of the same operation is as follows:
["Fields": protected] => array (7 ){
[0] => string (3) "mid"
[1] => string (4) "muid"
[2] => string (5) "muser"
[3] => string (8) "mcontent"
[4] => string (5) "mtime"
["_ Autoinc"] => bool (true)
["_ Pk"] => string (3) "mid"
}
The following is normal on both local and sae:
["_ Map": protected] => array (4 ){
["User"] => string (5) "muser"
["Content"] => string (8) "mcontent"
["Time"] => string (5) "mtime"
["Aid"] => string (4) "maid"
}
The table above sae does not have that field. The field added later is invalid. it is also invalid if I re-upload all the tables.
Runtime deleted many times is also invalid. I don't know why?