Category : codeigniter

I want to use the custom date function format inside my eloquent query to format close_date and close_time concat column. codes: $client_date = client_date(utc_date(), ‘Y-m-d H:i:s’); // THE QUERY $qrs = $this->db ->where("close_date IS NOT NULL") ->where("close_time IS NOT NULL AND CONCAT(close_date, ‘ ‘, close_time) < ‘" . $client_date . "’") ->where(‘status’, 1) ->get(‘product’) ->result(); ..

Read more

Here is my controller:- public function order_info() { $this->load->model(‘customize_model’); $data[‘user’] = $this->customize_model->order_info(); $data[‘product’]=$this->customize_model->order_info(); $data[‘sale’] = $this->customize_model->order_info(); $this->load->view(‘custom/order’,$data); } And here is my modal:- public function order_info() { $query = $this->db->query("SELECT * FROM user JOIN product ON user.user_id = product.product_id JOIN sale ON user.user_id = sale.buyer ORDER BY user_id DESC LIMIT 100;"); return $query; } This ..

Read more

I am trying to access the data from the database but its showing error (Unknown column ‘admin_clients.org_password’ in ‘field list’). But from the database org_password field exits. In Model:- function adminloginMe($email, $password) { $this->db->select(‘admin_clients.admin_clients_id,admin_clients.org_password,admin_clients.org_name,admin_clients.roleId,admin_clients.role’); $this->db->from(‘admin_clients as admin_clients’); $this->db->where(‘admin_clients.org_mail’, $email); $this->db->where(‘admin_clients.isDeleted’, 0); $query = $this->db->get(); $user = $query->row(); } Check the image link for database result. ..

Read more

I am using ion auth to edit some user data.This is the code <h1><?php echo lang(‘edit_user_heading’);?></h1> <p><?php echo lang(‘edit_user_subheading’);?></p> <div id="infoMessage"><?php echo $message;?></div> <?php echo form_open(uri_string());?> <p> <?php echo lang(‘edit_user_fname_label’, ‘first_name’);?> <br /> <?php $data = array( ‘name’ => ‘first_name’, ‘value’ => set_value(‘first_name’, $first_name), ‘class’ => ‘form-control’ ); echo form_input($data);?> </p> This produces the input ..

Read more

Any solution for this error? I try to save this with Select Option from othe table I got this error mysqli_sql_exception #1452 Cannot add or update a child row: a foreign key constraint fails (`ci4`.`tbl_menu`, CONSTRAINT `tbl_menu_ibfk_1` FOREIGN KEY (`id_makanan`) REFERENCES `tbl_makanan` (`id`)) when i try make select option from other table This my MakananModel.php ..

Read more