• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with codeigniter and json messanges

ok here's the probleme: I have a controller with a method that (with the help of a model) lets me eliminate a row in the database and return a json object to the browser.

The probleme it's that the string never gets to the browser, i put some log messages in each step of the process, even in the _output method of the controller and i can still see the message generated by it, but it doesn't put it in the ouput;

Oh, i forget to tell you guys that i was using the $.ajax method to do it, but when i try to acces the function in the controller in the url (exj: www.algo.com/libros/eliminar/25) it works just fine.

Can anyone help me with this one?

this is the minimiced version of the controller that i used:

class Libros extends Controller
function Libros()

function eliminar($id)
$query_json = $this->Datalayer->eliminar_libro($id);

log_message('info', 'Libros/Eliminar: '.$query_json);

echo $query_json;

function _output($output)
log_message('info', 'output: '.$output);

echo $output;

I recommend 2 tools for you:


Firebug is enough for seeing what AJAX is doing and what your server is returning to it. However, you can do some cool internal PHP logging with a firebug plugin called firephp:


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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