1

I am just wondering if there is a built in function to call if you want to get the generated mysql generated string in codeigniter. Consider the following example

$this->db->from('mytable');
$this->db->where('id', $id);
$query = $this->db->get();

I just wondering if there is return $this->db->return_string() that would result to

SELECT * FROM mytable blablablabla blablabla

I am scheming through out their site but seems cannot find what I am looking for.. any input guys?

1
  • sorry for the duplicate question guys but I had search on google about this question but I did not came up to that address, maybe I had the not mention the exact keywords on the search box.. it was okay now and thank you for the inputs ..:) Commented Oct 9, 2013 at 7:16

1 Answer 1

2

you could try this:

echo $this->db->last_query();
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.