Validation ... |
[eluser]llbbl[/eluser]
[quote author="[email protected]" date="1191489679"]I am looking for this solution also, I have looked into the error handling, however, I can't seem to intercept the CI error handling for example insert ('name') values ('hello', 'yo'); throws an error, and I would like to catch this and just display 'error' (I would like this functionality for ajax, instead of returning a huge page to have to parse for an error message.)[/quote] this is best way IMO to do insert statements. Code: $this->db->query("INSERT INTO `databasename` SET field1='something', field2='something', field3='something'"); of course you need to load or autoload the CI database library for this to work. if its still causing you problems, it will be a mysql database configuration issue. i suggest echoing the query if it isn't already, then copy paste to phpmyadmin .. till you get your query right... the errors there usually will give you a better hint has to what you are doing wrong database wise. |
Messages In This Thread |
Validation ... - by El Forum - 09-24-2007, 07:45 PM
Validation ... - by El Forum - 09-25-2007, 11:21 AM
Validation ... - by El Forum - 09-25-2007, 12:14 PM
Validation ... - by El Forum - 09-25-2007, 12:26 PM
Validation ... - by El Forum - 09-25-2007, 01:23 PM
Validation ... - by El Forum - 09-26-2007, 06:27 AM
Validation ... - by El Forum - 10-03-2007, 10:21 PM
Validation ... - by El Forum - 10-03-2007, 10:47 PM
Validation ... - by El Forum - 10-03-2007, 10:57 PM
|