mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 08:28:43 +01:00
Add LINE,FILE to nextid/lastid
This commit is contained in:
parent
cc1e174762
commit
5713329ff9
@ -1306,18 +1306,18 @@
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->db->query("SELECT id FROM phpgw_nextid WHERE appname='".$appname."'");
|
$phpgw->db->query("SELECT id FROM phpgw_nextid WHERE appname='".$appname."'",__LINE__,__FILE__);
|
||||||
while( $phpgw->db->next_record() ) {
|
while( $phpgw->db->next_record() ) {
|
||||||
$id = $phpgw->db->f("id");
|
$id = $phpgw->db->f("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($id) || !$id) {
|
if (empty($id) || !$id) {
|
||||||
$id = 1;
|
$id = 1;
|
||||||
$phpgw->db->query("INSERT INTO phpgw_nextid (appname,id) VALUES ('".$appname."',".$id.")");
|
$phpgw->db->query("INSERT INTO phpgw_nextid (appname,id) VALUES ('".$appname."',".$id.")",__LINE__,__FILE__);
|
||||||
$phpgw->db->query("UPDATE phpgw_nextid SET id=".$id." WHERE appname='".$appname."'");
|
$phpgw->db->query("UPDATE phpgw_nextid SET id=".$id." WHERE appname='".$appname."'",__LINE__,__FILE__);
|
||||||
} else {
|
} else {
|
||||||
$id = $id + 1;
|
$id = $id + 1;
|
||||||
$phpgw->db->query("UPDATE phpgw_nextid SET id=".$id." WHERE appname='".$appname."'");
|
$phpgw->db->query("UPDATE phpgw_nextid SET id=".$id." WHERE appname='".$appname."'",__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return intval($id);
|
return intval($id);
|
||||||
@ -1337,7 +1337,7 @@
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->db->query("SELECT id FROM phpgw_nextid WHERE appname='".$appname."'");
|
$phpgw->db->query("SELECT id FROM phpgw_nextid WHERE appname='".$appname."'",__LINE__,__FILE__);
|
||||||
while( $phpgw->db->next_record() ) {
|
while( $phpgw->db->next_record() ) {
|
||||||
$id = $phpgw->db->f("id");
|
$id = $phpgw->db->f("id");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user