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


PHP MY_Model::save方法代码示例

本文整理汇总了PHP中MY_Model::save方法的典型用法代码示例。如果您正苦于以下问题:PHP MY_Model::save方法的具体用法?PHP MY_Model::save怎么用?PHP MY_Model::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MY_Model的用法示例。


在下文中一共展示了MY_Model::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 public function save($id = NULL, $db_array = NULL)
 {
     $db_array = $db_array ? $db_array : $this->db_array();
     $id = parent::save($id, $db_array);
     $this->db->query('ALTER TABLE `' . $db_array['custom_field_table'] . '` ADD `' . $db_array['custom_field_column'] . '` VARCHAR( 255 ) NOT NULL');
     return $id;
 }
开发者ID:rumahkecil,项目名称:fusioninvoice-1,代码行数:7,代码来源:mdl_custom_fields.php

示例2: save

 public function save($db_array, $user_id = NULL)
 {
     unset($db_array['passwordv']);
     unset($db_array['client_id_autocomplete_label']);
     $db_array['password'] = md5($db_array['password']);
     parent::save($db_array, $user_id);
 }
开发者ID:najahnasir,项目名称:MyClientBase,代码行数:7,代码来源:mdl_client_center.php

示例3: array

 function db_install()
 {
     $return = array();
     $this->load->database();
     $this->db->db_debug = 0;
     if ($this->db_install_tables()) {
         $return[] = $this->lang->line('install_database_success');
     } else {
         $return[] = $this->lang->line('install_database_problem');
         return $return;
     }
     $db_array = parent::db_array();
     $db_array['password'] = md5($db_array['password']);
     $db_array['global_admin'] = 1;
     unset($db_array['passwordv']);
     if (parent::save($db_array, NULL, FALSE)) {
         $return[] = $this->lang->line('install_admin_account_success');
     } else {
         $return[] = $this->lang->line('install_admin_account_problem');
         return $return;
     }
     $return[] = $this->lang->line('installation_complete');
     $return[] = $this->lang->line('install_delete_folder');
     $return[] = APPPATH . 'modules_core/setup';
     $return[] = anchor('sessions/login', $this->lang->line('log_in'));
     $this->mdl_mcb_modules->refresh();
     return $return;
 }
开发者ID:Meritxell01,项目名称:prova,代码行数:28,代码来源:mdl_setup.php

示例4: find_or_create

 public function find_or_create($tag)
 {
     $in = $this->where('tag', $tag)->find(NULL, 1);
     if (empty($in)) {
         $in['id'] = parent::save(array('tag' => $tag));
     }
     return $in['id'];
 }
开发者ID:ak826843,项目名称:bmf,代码行数:8,代码来源:tag.php

示例5: salvar

 public function salvar($dados, $id)
 {
     $countLogin = $this->verificarDuplicidadeLogin($dados['login'], $id);
     if ($countLogin > 0) {
         return -2;
     }
     return parent::save($dados, $id);
 }
开发者ID:4bner,项目名称:bsbios,代码行数:8,代码来源:UsuarioModel.php

示例6: save

 public function save()
 {
     $db_array = $this->db_array();
     if (!$this->input->post('provider_active')) {
         $db_array['provider_active'] = 0;
     }
     parent::save($db_array, uri_assoc('provider_id', 4));
 }
开发者ID:Meritxell01,项目名称:prova,代码行数:8,代码来源:mdl_provider.php

示例7: save

 public function save($db_array, $user_id = NULL)
 {
     parent::save($db_array, $user_id);
     if (!$user_id) {
         $user_id = $this->db->insert_id();
     }
     return $user_id;
 }
开发者ID:roxio,项目名称:MyClientBase-SB,代码行数:8,代码来源:mdl_users.php

示例8: save

 public function save($db_array, $id = NULL, $initial_stock_quantity = NULL)
 {
     parent::save($db_array, $id);
     if ($initial_stock_quantity) {
         $inventory_id = $this->db->insert_id();
         $this->mdl_inventory_stock->adjust($inventory_id, $initial_stock_quantity, 0, $this->lang->line('initial_stock_quantity'));
     }
 }
开发者ID:najahnasir,项目名称:MyClientBase,代码行数:8,代码来源:mdl_inventory.php

示例9: save

 public function save()
 {
     $now_in_mysql_format = date('Y-m-d H:i:s');
     $this->updated = $now_in_mysql_format;
     if (!($this->id > 0)) {
         $this->created = $now_in_mysql_format;
     }
     return parent::save();
 }
开发者ID:hharrysidhu,项目名称:OpenVBX,代码行数:9,代码来源:vbx_audio_file.php

示例10: save_custom

 public function save_custom($invoice_id, $db_array)
 {
     $invoice_custom_id = null;
     $db_array['invoice_id'] = $invoice_id;
     $invoice_custom = $this->where('invoice_id', $invoice_id)->get();
     if ($invoice_custom->num_rows()) {
         $invoice_custom_id = $invoice_custom->row()->invoice_custom_id;
     }
     parent::save($invoice_custom_id, $db_array);
 }
开发者ID:Thewafflication,项目名称:InvoicePlane,代码行数:10,代码来源:mdl_invoice_custom.php

示例11: save_custom

 public function save_custom($payment_id, $db_array)
 {
     $payment_custom_id = null;
     $db_array['payment_id'] = $payment_id;
     $payment_custom = $this->where('payment_id', $payment_id)->get();
     if ($payment_custom->num_rows()) {
         $payment_custom_id = $payment_custom->row()->payment_custom_id;
     }
     parent::save($payment_custom_id, $db_array);
 }
开发者ID:Thewafflication,项目名称:InvoicePlane,代码行数:10,代码来源:mdl_payment_custom.php

示例12: save

 function save($db_array, $invoice_group_id)
 {
     if (!isset($db_array['invoice_group_prefix_year'])) {
         $db_array['invoice_group_prefix_year'] = 0;
     }
     if (!isset($db_array['invoice_group_prefix_month'])) {
         $db_array['invoice_group_prefix_month'] = 0;
     }
     parent::save($db_array, $invoice_group_id);
 }
开发者ID:Meritxell01,项目名称:prova,代码行数:10,代码来源:mdl_invoice_groups.php

示例13: save_custom

 public function save_custom($user_id, $db_array)
 {
     $user_custom_id = NULL;
     $db_array['user_id'] = $user_id;
     $user_custom = $this->where('user_id', $user_id)->get();
     if ($user_custom->num_rows()) {
         $user_custom_id = $user_custom->row()->user_custom_id;
     }
     parent::save($user_custom_id, $db_array);
 }
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:10,代码来源:mdl_user_custom.php

示例14: save_custom

 public function save_custom($quote_id, $db_array)
 {
     $quote_custom_id = NULL;
     $db_array['quote_id'] = $quote_id;
     $quote_custom = $this->where('quote_id', $quote_id)->get();
     if ($quote_custom->num_rows()) {
         $quote_custom_id = $quote_custom->row()->quote_custom_id;
     }
     parent::save($quote_custom_id, $db_array);
 }
开发者ID:rumahkecil,项目名称:fusioninvoice-1,代码行数:10,代码来源:mdl_quote_custom.php

示例15: save_custom

 public function save_custom($client_id, $db_array)
 {
     $client_custom_id = NULL;
     $db_array['client_id'] = $client_id;
     $client_custom = $this->where('client_id', $client_id)->get();
     if ($client_custom->num_rows()) {
         $client_custom_id = $client_custom->row()->client_custom_id;
     }
     parent::save($client_custom_id, $db_array);
 }
开发者ID:yalmasri,项目名称:fusioninvoice,代码行数:10,代码来源:mdl_client_custom.php


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