I have a sql statement in my model,
I then say
$query = $this->db->query($sql, array(fields, fields1);
if ($query) {
return true:
} else {
You can simply use this at the end..
echo $this->db->last_query();
I'm using xdebug for watch this values in VSCode with the respective extension and CI v2.x. I add the expresion $this->db->last_query()
in the watch section, and I add xdebugSettings
node like these lines for get non truncate value in the launch.json.
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000,
"xdebugSettings": {
"max_data": -1,
"max_children": -1
}
},
And run my debuger with the breakpoint and finally just select my expresion and do click right > copy value.