Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Main_page extends CI_Model{
- /**
- * Constructor for discovery
- *
- */
- function __construct(){
- parent::__construct();
- }
- /**
- * Function for storing the Loaners.club's invoice.
- *
- * @param $data array.
- *
- * @return true if successful, otherwise false.
- */
- public function login_user($email , $password){
- $this->db->where('email', $email);
- $this->db->where('password', $password);
- $result = $this->db->get('new_users');
- if($result ->num_rows() == 1){
- return $result->row(0)->id;
- }else{
- return false;
- }
- }
- public function storeRegisterInfo($data){
- // print_r($data);
- $insert = $this->db->insert('new_users',$data);
- // $lastid = $this->db->insert_id(); echo $lastid; exit;
- return $insert;
- }
- public function storeCardInfo($data){
- // print_r($data);
- $insert = $this->db->insert('user_money',$data);
- // $lastid = $this->db->insert_id(); echo $lastid; exit;
- return $insert;
- }
- public function getAllrequest(){
- $query ='SELECT * FROM user_money';
- $query = $this->db->query($query);
- $result = $query->result();
- return $result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement