Subject: Getting the sql string
Is it possible to get the sql string generated by a model?
I thought that the following would do the trick, but it doesnt seem to work.$user = user_model::find(1); $string = $user->to_string(); //or ->to_s() ?
$user = user_model::find(1); $string = $user->to_string(); //or ->to_s() ?
Try user_model::table()->last_sql
(1-1/1)
June 27 2010
April 16, 2013
Subject: Getting the sql string
Is it possible to get the sql string generated by a model?
I thought that the following would do the trick, but it doesnt seem to work.