It's written in this model.
Array (' Pictitle ', ' pictoken ', ' Piccategroy ', ' picauthor ', ' picposttime ', ' _type ' = ' left '), ' picture_ Attachment ' =>array (' Pictureid ', ' pictureurl ', ' creattime ', ' _on ' = ' = Picture.pictoken ' picture_ Attachment.pictureid '), );}
Picture and picture_attachment two tables
That's what the controller says. I instantiate Picview with the D method. Is this the real table name that must be in the database?
Public Function Pic () { $PicModel =d (' Picview '); Dump ($PicModel); $s = $PicModel->select (); Dump ($s); }
Some of the errors returned
["DB":p rotected] + object (think\db\driver\mysql) #8 (19) {
["DbType":p rotected] = NULL
["Autofree":p rotected] = bool (false)
["Model":p rotected] and string (7) "_think_"
["Pconnect":p rotected] = bool (false)
["Querystr":p rotected] = string (0) ""
["Modelsql":p rotected] = = Array (0) {
}
["Lastinsid":p rotected] = NULL
["NumRows":p rotected] = Int (0)
["Numcols":p rotected] = Int (0)
["Transtimes":p rotected] = Int (0)
["Error":p rotected] + string (0) ""
["LinkID":p rotected] = = Array (0) {
}
["_linkid":p rotected] = NULL
["Queryid":p rotected] = NULL
["Connected":p rotected] = bool (false)
["Autoinc":p rotected] = bool (false)
["Patchvalidate":p rotected] = bool (false)
Reply to discussion (solution)
# Picview Model initialization, if the Picview class exists is called and initialized, if it does not exist, the model is initialized according to the table name $PicModel =d (' Picview '); #输出所有数据 actually executed SQL statement is # SELECT * FROM Picview $s = $PicModel->select ();
PHP Beginners do not recommend looking directly at the frame!
# Picview Model initialization, if the Picview class exists is called and initialized, if it does not exist, the model is initialized according to the table name $PicModel =d (' Picview '); #输出所有数据 actually executed SQL statement is # SELECT * FROM Picview $s = $PicModel->select ();
PHP Beginners do not recommend looking directly at the frame!
Thank you, Good Samaritan. I've already solved it. Two table field sorting is not the same cause the other good frame use convenient point