• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI4 - Generate sql query from query builder

How to generate sql query from query builder if I have function like this?

PHP Code:
public function get_user_by_email($email)

Also on CI3 if I have error on my generated SQL, it will show the generated query while on CI4 it only show the mysqli_sql_exception without the SQL query. How can I show the sql query everytime I have error with query builder?

PHP Code:
$error $db->error(); // Has keys 'code' and 'message'

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.