当前位置: 首页>>代码示例>>PHP>>正文


PHP database::insert_data方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:14,代码来源:class-product.php

示例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));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:5,代码来源:class-orders.php

示例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));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-user.php

示例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')));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-news.php

示例5: insertLienhe

 function insertLienhe($fullname, $email, $mobile, $noidung)
 {
     return parent::insert_data($this->table, array('fullname' => $fullname, 'email' => $email, 'mobile' => $mobile, 'noidung' => $noidung));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-lienhe.php

示例6: insertConfig

 function insertConfig($name, $values_data)
 {
     return parent::insert_data($this->table, array('name' => $name, 'values_data' => $values_data));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-config.php

示例7: insertMenuGroup

 function insertMenuGroup($name, $status)
 {
     return parent::insert_data($this->table, array('menu_group_name' => $name, 'status' => $status));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-menu.php

示例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));
 }
开发者ID:vudinhkien,项目名称:APTECH,代码行数:4,代码来源:class-cat-product.php


注:本文中的database::insert_data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。