|
真是郁闷,$field->type;$field->max_length;这个取的似乎有问题。。。
$fields = $this->db->field_data('kudubook');
foreach ($fields as $field)
{
echo $field->name;
echo $field->type;
echo $field->max_length;
echo $field->primary_key;
}
max_length取值与数据库实际长度不符。。。
name string 4 实际varchar50
type int 1 实际int11
author string 8 实际varchar20
intro string 479实际varchar500
晕。。。。这样怎么设输入字符串长度限制呢
|
|