Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

cakephp get sql query string

// As long as your query is not executed by toArray(), all() or something similar, 
// you can use $q->sql() to retrieve the raw sql query that cakePHP will execute:
// Example:

$q = $this->Model->find();
var_dump($q->sql()); // raw sql query
 
PREVIOUS NEXT
Tagged: #cakephp #sql #query #string
ADD COMMENT
Topic
Name
6+5 =