我在我的本地XAMPP使用的Kohana/ORM试过,我得到以下错误Kohana的ORM:数组字符串转换错误
ErrorException [公告]:数组字符串转换 MODPATH \ ORM \类\ Kohana的\ ORM .PHP [980]
975 }
976 else
977 {
978 // List columns and mirror for performance
979 $this->_table_columns = $this->list_columns();
980 $this->_table_columns = array_combine($this->_table_columns, $this->_table_columns);
981
982 // Load column cache
983 ORM::$_column_cache[$this->_object_name] = $this->_table_columns;
984 }
985 }
这似乎是出现在不同的框架/ PHP应用程序的常见错误,但我还没有发现任何线索来解决它。
模型仅仅是基本的ORM
class Model_Product extends ORM {
}
MySQL表(InnoDB的 - UTF-8)有两个字段 ID - 初级INT 名字 - VARCHAR 50
没有巫术的任何地方,帮助非常感谢
在此先感谢!
编辑:请求vardump
array(2) {
["id"]=>
array(13) {
["type"]=>
string(3) "int"
["min"]=>
string(11) "-2147483648"
["max"]=>
string(10) "2147483647"
["column_name"]=>
string(2) "id"
["column_default"]=>
NULL
["data_type"]=>
string(3) "int"
["is_nullable"]=>
bool(false)
["ordinal_position"]=>
int(1)
["display"]=>
string(2) "11"
["comment"]=>
string(0) ""
["extra"]=>
string(14) "auto_increment"
["key"]=>
string(3) "PRI"
["privileges"]=>
string(31) "select,insert,update,references"
}
["name"]=>
array(12) {
["type"]=>
string(6) "string"
["column_name"]=>
string(4) "name"
["column_default"]=>
NULL
["data_type"]=>
string(7) "varchar"
["is_nullable"]=>
bool(false)
["ordinal_position"]=>
int(2)
["character_maximum_length"]=>
string(2) "50"
["collation_name"]=>
string(15) "utf8_general_ci"
["comment"]=>
string(0) ""
["extra"]=>
string(0) ""
["key"]=>
string(0) ""
["privileges"]=>
string(31) "select,insert,update,references"
}
}
请将'var_dump($ this-> list_columns())'添加到您的问题中。 – hakre
添加了vardump – rootman
您使用的是什么版本? – Kowser