mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
...And now it works
This commit is contained in:
parent
8809fee944
commit
28ba0d55cc
@ -626,7 +626,7 @@ function insert_record($table, $dataobject, $returnid=true) {
|
||||
|
||||
if ($CFG->dbtype == "postgres7" and isset($pkey)){
|
||||
$oid = $db->Insert_ID();
|
||||
if ($rs = $db->Execute("SELECT $pkey FROM $CFG->prefix$table WHERE 'oid' = $oid")) {
|
||||
if ($rs = $db->Execute("SELECT $pkey FROM $CFG->prefix$table WHERE oid = $oid")) {
|
||||
if ($rs->RecordCount() == 1) {
|
||||
return $rs->fields[0];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user