[eluser]toopay[/eluser]
Simply set (within config/database.php)
Code:
$db['default']['db_debug'] = TRUE;
into FALSE. Thus, every query() execution will returning FALSE if it fail, then you could handle the error yourself. But i agree with those black cat
, fix that error.
The error is in your SQL statement, not by user input, which in this case, CI try to fails gracefully, instead outputing 500 internal server error, which probably will be more difficult to you to debug.