// $Node = D("Permit.Node");
// $Node->select();
$Node=new Model();
$Node->query("select * from em_node");
返回空对象,我就无语了。这还让不让用一点提示不给
dump($Node);
结果是
<pre>ob
["_extModel":"Model":private] => NULL
["db":protected] => ob
["dbType":protected] => string(5) "MYSQL"
["autoFree":protected] => bool(false)
["model":protected] => string(7) "_think_"
["pconnect":protected] => bool(false)
["queryStr":protected] => string(21) "select * from em_node"
["modelSql":protected] => array(1) {
[""] => string(21) "select * from em_node"
}
["lastInsID":protected] => NULL
["numRows":protected] => int(8)
["numCols":protected] => int(0)
["transTimes":protected] => int(0)
["error":protected] => string(0) ""
["li
[0] => resource(29) of type (mysql li
}
["_li
["queryID":protected] => resource(30) of type (mysql result)
["connected":protected] => bool(true)
["comparison":protected] => array(10) {
["eq"] => string(1) "="
["neq"] => string(2) "<>"
["gt"] => string(1) ">"
["egt"] => string(2) ">="
["lt"] => string(1) "<"
["elt"] => string(2) "<="
["notlike"] => string(8) "NOT LIKE"
["like"] => string(4) "LIKE"
["in"] => string(2) "IN"
["notin"] => string(6) "NOT IN"
}
["selectSql":protected] => string(96) "SELECT%DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%%LIMIT% %UNION%%COMMENT%"
["bind":protected] => array(0) {
}
}
["pk":protected] => string(2) "id"
["tablePrefix":protected] => string(3) "em_"
["name":protected] => string(0) ""
["dbName":protected] => string(0) ""
["connection":protected] => string(0) ""
["tableName":protected] => string(0) ""
["trueTableName":protected] => string(3) "em_"
["error":protected] => string(0) ""
["fields":protected] => array(0) {
}
["data":protected] => array(0) {
}
["options":protected] => array(0) {
}
["_validate":protected] => array(0) {
}
["_auto":protected] => array(0) {
}
["_map":protected] => array(0) {
}
["_scope":protected] => array(0) {
}
["autoCheckFields":protected] => bool(true)
["patchValidate":protected] => bool(false)
["methods":protected] => array(13) {
[0] => string(5) "table"
[1] => string(5) "order"
[2] => string(5) "alias"
[3] => string(6) "having"
[4] => string(5) "group"
[5] => string(4) "lock"
[6] => string(8) "distinct"
[7] => string(4) "auto"
[8] => string(6) "filter"
[9] => string(8) "validate"
[10] => string(6) "result"
[11] => string(4) "bind"
[12] => string(5) "token"
}
}
</pre>
最佳答案