聯(lián)系官方銷售客服
1835022288
028-61286886
求一個數(shù)組insert入數(shù)據(jù)庫的例子;
$field = $this->get_cache('module-'.SITE_ID.'-'.APP_DIR, 'field');
foreach ($field as $t) {
$name = $t['fieldname'];
if ($name && isset($data[$name])) $add[$t['ismain']][$name] = $data[$name];
}
參考了這個 但是一直報 $this 有錯誤(PHP小白)
https://codeigniter.org.cn/user_guide/database/query_builder.html#id8
回復(fù)@黃卿
Using $this when not in object context
直接這樣寫的話會報錯
看在
一樓手冊可以insert