fixed typo in security checks for prescription access
[openemr.git] / library / adodb / tests / testgenid.php
blob479f7124b53e15d2b4ec4770b019e1b42db5ed32
1 <?php
2 /*
3 V4.20 22 Feb 2004
5 Run multiple copies of this php script at the same time
6 to test unique generation of id's in multiuser mode
7 */
8 include_once('../adodb.inc.php');
9 $testaccess = true;
10 include_once('testdatabases.inc.php');
12 function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
14 $table = 'adodbseq';
16 $db->Execute("drop table $table");
17 //$db->debug=true;
19 $ctr = 5000;
20 $lastnum = 0;
22 while (--$ctr >= 0) {
23 $num = $db->GenID($table);
24 if ($num === false) {
25 print "GenID returned false";
26 break;
28 if ($lastnum + 1 == $num) print " $num ";
29 else {
30 print " <font color=red>$num</font> ";
31 flush();
33 $lastnum = $num;