How can I see the sql stament generated from above code? Because I need to run the run the sql stamement in phpmyadmin to test some outputs (Not for this)
You can try DB::last_query(), but with ORM you're never sure what the last query was.
If that doesn't work, enable the profiler in your app/config/config.php, and enable DB profiling in your db.php. The profiler will show all queries executed, with a query analysis (if on MySQL) and execution time info.
find() returns the result of a get() or get_one() operation, so it executes the query directly, there is no option to get the intermediate SQL before execution.