Displaying the SQL - Error debugging |
[eluser]bcarter[/eluser]
Hi there I'm trying to display data but it's returning a blank page. I want to find out what the SQL is so that I can work out what the problem is but I don't know how. Here's the code... Model Code: <?php View Code: <?php foreach ($query3 as $row) { ?> And the Controller Code: function information() { Can somebody help please?!!! Thanks
[eluser]danmontgomery[/eluser]
Code: '$sid' Shouldn't be in quotes. Strings with single quotes are translated literally. If it's returning a blank page there's a PHP error, I would guess it's because you're calling ->result() without checking for a valid MySQL result first. Code: $query = $this->db->get_where(...); To view all of the queries run on the page, enable the profiler. http://ellislab.com/codeigniter/user-gui...iling.html Code: $this->output->enable_profiler(); |
Welcome Guest, Not a member yet? Register Sign In |