php - Convert Mysql query to Codeigniter -


i need bit of help... trying convert mysql query codeigniter, not working...

mysql:

select      users.email,      transactions.id,      transactions.type,      transactions.status,      transactions.sum,      transactions.created,      transactions.title      transactions, users      users.id=transactions.user_id ,      transactions.type='winning_claim' ,      date(transactions.created)=date(subdate(now(),1)) 

codeigniter: `

$this->db->select('users.email, transactions.id, transactions.type, transactions.status ,transactions.sum, transactions.created, transactions.title');                 $this->db->from('transactions');                 $this->db->join('users', 'users.id = transactions.user_id');                 $this->db->where('transactions.type', 'winning_claim');                 $this->db->where('date(transactions.created)', 'date(subdate(now(), 1))'/*,  false */);                 $select_la_data = $this->db->get();` 

does have thoughts?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -