mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
Fix for read_last_entry, causing pgsql to fail due to diff return field from max()
This commit is contained in:
parent
cd91a6c4a1
commit
bbb3cdf388
@ -197,7 +197,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$this->db2->query("select contact_name,contact_value from $this->ext_table where contact_id='" . $this->db->f("id") . "'",__LINE__,__FILE__);
|
||||
$this->db2->query("SELECT contact_name,contact_value FROM $this->ext_table where contact_id='" . $this->db->f("id") . "'",__LINE__,__FILE__);
|
||||
while ($this->db2->next_record()) {
|
||||
// If its not in the list to be returned, don't return it.
|
||||
// This is still quicker then 5(+) separate queries
|
||||
@ -223,12 +223,13 @@
|
||||
|
||||
$this->db2 = $this->db;
|
||||
|
||||
$this->db->query("select max(id) from $this->std_table");
|
||||
$this->db->query('SELECT max(id) FROM '.$this->std_table,__LINE__,__FILE__);
|
||||
$this->db->next_record();
|
||||
|
||||
$id = $this->db->f("max(id)");
|
||||
$id = $this->db->f(0);
|
||||
echo $id;exit;
|
||||
|
||||
$this->db->query("select id,lid,tid,owner $t_fields from $this->std_table WHERE id='$id'");
|
||||
$this->db->query("SELECT id,lid,tid,owner $t_fields from $this->std_table WHERE id='$id'",__LINE__,__FILE__);
|
||||
$this->db->next_record();
|
||||
|
||||
$return_fields[0]["id"] = $this->db->f("id");
|
||||
|
Loading…
Reference in New Issue
Block a user