本文整理汇总了PHP中database::insert_data方法的典型用法代码示例。如果您正苦于以下问题:PHP database::insert_data方法的具体用法?PHP database::insert_data怎么用?PHP database::insert_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类database
的用法示例。
在下文中一共展示了database::insert_data方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertProduct
function insertProduct($pro_name, $image, $tomtat, $description, $price_niemyet, $price_sale, $thongsokythuat, $image_phu, $ma_sp, $soluong, $position, $hot, $status, $cat_id, $mausac)
{
$pro_id = parent::insert_data($this->table, array('pro_name' => $pro_name, 'image' => $image, 'tomtat' => $tomtat, 'description' => $description, 'price_niemyet' => $price_niemyet, 'price_sale' => $price_sale, 'thongsokythuat' => $thongsokythuat, 'image_phu' => $image_phu, 'ma_sp' => $ma_sp, 'soluong' => $soluong, 'position' => $position, 'hot' => $hot, 'status' => $status, 'mausac' => $mausac, 'ngaydangbai' => date('Y-m-d H:i:s')));
if ($pro_id != '') {
$arr = array();
$arr['pro_id'] = $pro_id;
for ($i = 0; $i < count($cat_id); $i++) {
$arr['cat_id'][] = parent::insert_data($this->table1, array('pro_id' => $pro_id, 'cat_id' => $cat_id[$i]));
}
return $arr;
} else {
return false;
}
}
示例2: insertOrders
function insertOrders($order_name, $uid, $product_info, $total, $ship_address, $method_pay, $status)
{
date_default_timezone_set("Asia/Ho_Chi_Minh");
return parent::insert_data($this->table, array('order_name' => $order_name, 'u_id' => $uid, 'product_info' => $product_info, 'total' => $total, 'ngaydat' => date('Y-m-d H:i:s'), 'ship_address' => $ship_address, 'method_pay' => $method_pay, 'status' => $status));
}
示例3: insertUser
function insertUser($username, $password, $fullname, $email, $address, $mobile, $status, $created_date, $avatar)
{
return parent::insert_data($this->table, array('user' => $username, 'pass' => $password, 'fullname' => $fullname, 'email' => $email, 'address' => $address, 'mobile' => $mobile, 'status' => $status, 'created_date' => $created_date, 'avatar' => $avatar));
}
示例4: insertNews
function insertNews($title, $images, $tomtat, $content, $cat_id, $hotnews, $featured)
{
return parent::insert_data($this->table, array('title' => $title, 'tomtat' => $tomtat, 'images' => $images, 'content' => $content, 'cat_id' => $cat_id, 'hot' => $hotnews, 'featured_home' => $featured, 'ngaydangbai' => date('Y-m-d H:i:s')));
}
示例5: insertLienhe
function insertLienhe($fullname, $email, $mobile, $noidung)
{
return parent::insert_data($this->table, array('fullname' => $fullname, 'email' => $email, 'mobile' => $mobile, 'noidung' => $noidung));
}
示例6: insertConfig
function insertConfig($name, $values_data)
{
return parent::insert_data($this->table, array('name' => $name, 'values_data' => $values_data));
}
示例7: insertMenuGroup
function insertMenuGroup($name, $status)
{
return parent::insert_data($this->table, array('menu_group_name' => $name, 'status' => $status));
}
示例8: insertCat
function insertCat($name, $parent_id, $position, $home)
{
return parent::insert_data($this->table, array('cat_name' => $name, 'parent_id' => $parent_id, 'position' => $position, 'home' => $home));
}