Skip to content

$adb->getUniqueID($seqname) sometimes returns 0 even if the sequence exists

The library used to db access : adodb -> Latest version is available at http://adodb.sourceforge.net

Sometimes fails to get new uniqueid using the method GenID(seqname='adodbseq',startID=1) and returns 0

This is in file vtiger/libraries/adodb/adodb.inc.php

Reproduce test.php file in vtiger root:

setDieOnError(true); $i = 0; while(true){ $i++; $id = $adb->getUniqueID("vtiger_field"); // you can test with other {tablename}_seq tables also if($id == 0) { echo "Getted ids count: $i : id=$id"; break; } } ?>