See the Current Changelog. Older changelogs: v3.x, v2.x.
New API for creating your custom caching class which is stored in $ADODB_CACHE:
include "/path/to/adodb.inc.php";
$ADODB_CACHE_CLASS = 'MyCacheClass';
class MyCacheClass extends ADODB_Cache_File
{
function writecache($filename, $contents,$debug=false){...}
function &readcache($filename, &$err, $secs2cache, $rsClass){ ...}
:
}
$DB = NewADOConnection($driver);
$DB->Connect(...); ## MyCacheClass created here and stored in $ADODB_CACHE global variable.
$data = $rs->CacheGetOne($sql); ## MyCacheClass is used here for caching...
Memcache supports multiple pooled hosts now. Only if none of the pooled servers can be contacted will a connect error be generated. Usage example below:
$db = NewADOConnection($driver);
$db->memCache = true; /// should we use memCache instead of caching in files
$db->memCacheHost = array($ip1, $ip2, $ip3); /// $db->memCacheHost = $ip1; still works
$db->memCachePort = 11211; /// this is default memCache port
$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
$db->Connect(...);
$db->CacheExecute($sql);
_ using __set(). Thx Daniel Cook. http://phplens.com/lens/lensforum/msgs.php?id=17200*.cache files deleted.Adodb-dict contributions by Gaetano
Support for INDEX in data-dict. Example: idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94. The following example features mutiple indexes, including a compound index idx_ev1.
event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
event_type I(4) NOTNULL
event_start_date T DEFAULT NULL **INDEX id_esd**,
event_end_date T DEFAULT '0000-00-00 00:00:00' **INDEX id_eted**,
event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 **INDEX id_evp**,
event_owner I(11) DEFAULT 0 **INDEX idx_ev1**,
event_project I(11) DEFAULT 0 **INDEX idx_ev1**,
event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
event_icon C(20) DEFAULT 'obj/event',
event_description X
Prevents the generated SQL from including double drop-sequence statements for REPLACE case of tables with autoincrement columns (on those dbs that emulate it via sequences)
makes any date defined as DEFAULT value for D and T columns work cross-database, not just the "sysdate" value (as long as it is specified using adodb standard format). See above example.
Fixed pdo's GetInsertID() support. Thx Ricky Su.
oci8 Prepare() now sets error messages if an error occurs.
Added 'PT_BR' to SetDateLocale() -- brazilian portugese.
charset in oci8 was not set correctly on *Connect()
ADOConnection::Transpose() now appends as first column the field names.
Added $ADODB_QUOTE_FIELDNAMES. If set to true, will autoquote field names in AutoExecute(),GetInsertSQL(), GetUpdateSQL().
Transpose now adds the field names as the first column after transposition.
Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter.
Added ErrorNo() to adodb-active-record.inc.php. Thx ante#novisplet.com.
Added support for using memcached with CacheExecute/CacheSelectLimit. Requires memcache module PECL extension. Usage:
$db = NewADOConnection($driver);
$db->memCache = true; /// should we use memCache instead of caching in files
$db->memCacheHost = "126.0.1.1"; /// memCache host
$db->memCachePort = 11211; /// this is default memCache port
$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
$db->Connect(...);
$db->CacheExecute($sql);
Implemented Transpose() for recordsets. Recordset must be retrieved using ADODB_FETCH_NUM. First column becomes the column name.
$db = NewADOConnection('mysql');
$db->Connect(...);
$db->SetFetchMode(ADODB_FETCH_NUM);
$rs = $db->Execute('select productname,productid,unitprice from products limit 10');
$rs2 = $db->Transpose($rs);
rs2html($rs2);
$off = $fieldOffset - 1 line in db2 driver, FetchField(). Tx Larry Menard.__toString (eg. Simple-XML). Thx Carl-Christian Salvesen._connect() in adodb-ado5.inc.php support for $database and $dataProvider parameters. Thx Larry Menard._errorMsg in postgres7 driver, so that ErrorMsg() displays properly when no error occurs.$conn->compat323 = true if you want MySQL 3.23 compat enabled. Fixes GetOne() Select-Limit problems._DBParameter() settings of fetchmode was wrong.$ACCEPTIP = 127.0.0.1 and changed suggested root password to something more secure._file_get_contents() function was missing in xmlschema. fixed.Datadict change by chris, cblin#tennaxia.com data mappings from:
oci8: X->varchar(4000) XL->CLOB
mssql: X->XL->TEXT
mysql: X->XL->LONGTEXT
fbird: X->XL->varchar(4000)
to:
oci8: X->varchar(4000) XL->CLOB
mssql: X->VARCHAR(4000) XL->TEXT
mysql: X->TEXT XL->LONGTEXT
fbird: X->VARCHAR(4000) XL->VARCHAR(32000)
Added $connection->disableBlobs to postgresql to improve performance when no bytea is used (2-5% improvement).
Removed all HTTP_* vars.
Added $rs->tableName to be set before calling AutoExecute().
Alex Rootoff rootoff#pisem.net contributed ukrainian language file.
Added new mysql_option() support using $conn->optionFlags array.
Added support for ldap_set_option() using the $LDAP_CONNECT_OPTIONS global variable. Contributed by Josh Eldridge.
Added LDAP_* constant definitions to ldap.
Added support for boolean bind variables. We use $conn->false and $conn->true to hold values to set false/true to.
We now do not close the session connection in adodb-session.inc.php as other objects could be using this connection.
We now strip off \0 at end of Ixora SQL strings in $perf->tohtml() for oci8.
\r\n not converted to spaces correctly in exporting data. Fixed.$cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/';For borland_ibase, BeginTrans(), changed:
$this->_transactionID = $this->_connectionID;
to
$this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
Fixed typo in mysqi_field_seek(). Thx to Sh4dow (sh4dow#php.pl).
LogSQL did not work with Firebird/Interbase. Fixed.
Postgres: made errorno() handling more consistent. Thx to Michael Jahn, Michael.Jahn#mailbox.tu-dresden.de.
Added informix patch to better support metatables, metacolumns by "Cecilio Albero" c-albero#eos-i.com
Cyril Malevanov contributed patch to oci8 to support passing of LOB parameters:
$text = 'test test test';
$sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
$stmt = $conn -> PrepareSP($sql);
$conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB);
$rs = '';
$conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
$conn -> Execute($stmt);
echo "return = ".$rs."<br>";</pre>
As he says, the LOBs limitations are:
_initrs().\`), and drop table/index.field name and generates column names with spaces correctly._skiprow1 is true. Thx to Gaetano G.