2011-01-05 11 views
0

$ this-> db-> query()メソッドでcodeigniterを使用するには?CodeIgniterのページ設定 - > db-> query

私はこのように行うだろうアクティブレコードクラスを使用する場合:

$query = $this->db->get('tb_cash_transaction',$num,$offset); 
$this->db->order_by("CURRENCY_ID", "asc"); 

を今私はます$ this-> DB->クエリ()それを実装する方法

$query = "SELECT * FROM tb_cash_transaction, tb_currency, tb_user where tb_cash_transaction.CURRENCY_ID=tb_currency.CURRENCY_ID and tb_cash_transaction.USER_ID=tb_user.USER_ID and TYPE='cash_out'"; 
$query = $this->db->query($query); 

を使用していますか?ありがとうございました。

答えて

2

...これで、これは役立つ

$query = "SELECT * FROM tb_cash_transaction, tb_currency, tb_user where tb_cash_transaction.CURRENCY_ID=tb_currency.CURRENCY_ID and tb_cash_transaction.USER_ID=tb_user.USER_ID and TYPE='cash_out' order by CURRENCY_ID asc LIMIT $offset , $num"; 
$query = $this->db->query($query); 

希望をお試しください。

ありがとうございます!

フッサン

関連する問題