Bug fix to be able to ignore auto returning pk for inserts

Some tables do not have primary keys, so an override code is needed to
avoid getting auto returning set there.
If db exec is called 'NULL' (or the async version), then no RETURNING is
added or checked.
This commit is contained in:
Clemens Schwaighofer
2014-05-19 17:34:02 +09:00
parent 5e7359554f
commit 9e9770d3ef
3 changed files with 25 additions and 22 deletions

View File

@@ -253,7 +253,7 @@
for ($i = 0; $i < count($output); $i ++)
{
$t_q = "('".$form->db_escape_string($output[$i])."')";
$form->db_exec($q.$t_q);
$form->db_exec($q.$t_q, 'NULL');
}
$elements[] = $form->form_create_element("filename");
}

View File

@@ -29,7 +29,6 @@
// set session name
define('SET_SESSION_NAME', EDIT_SESSION_NAME);
require(LIBS."Class.Login.inc");
require(LIBS."Class.DB.IO.inc");
require(LIBS.'Class.Smarty.Extend.inc');
// default lang