problem with ajax and sql insert - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: problem with ajax and sql insert (/showthread.php?tid=54593) |
problem with ajax and sql insert - El Forum - 09-16-2012 [eluser]andygo[/eluser] Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); This works normally. For example when I submit a form with userdata, the data is inserted into the database. However when I do an ajax call the sql query does not initiate. I have tested each peice of information by returning it to the ajax function and echo-ing to the screen to make sure all the info is going through cleanly. Besides, the array $query_terms is constructed the same way (and by the same code) as it is when i submit the form in the normal way. So, my question is: Is there something I am missing when trying to use a model from an ajax call? Thanks :-) problem with ajax and sql insert - El Forum - 09-16-2012 [eluser]andygo[/eluser] ok sorry feel very silly :-) i had a database field that doesnt accept null values..... one of the values in the $query_terms array was null [embarassed smiley goes here] |