ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:text

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
v5:database:text [2019/12/31 06:06] – PHP '==' vs SQL '=' comparison peterddv5:database:text [2020/01/04 18:31] – [Workaround for current ADOdb 5.20.15] renamed section dregad
Line 86: Line 86:
       1=>array(10002,'1964-06-02','Bezalel','Simmel','F','1985-11-21'),       1=>array(10002,'1964-06-02','Bezalel','Simmel','F','1985-11-21'),
       2=>array(10003,'1959-12-03','Parto','Bamford','M','1986-08-28'),       2=>array(10003,'1959-12-03','Parto','Bamford','M','1986-08-28'),
-      3=>array(10004,'1954-05-01','Chirstian','Koblick','M','1986-12-01'),+      3=>array(10004,'1954-05-01','Christian','Koblick','M','1986-12-01'),
       4=>array(10005,'1955-01-21','Kyoichi','Maliniak', 'M','1989-09-12'),       4=>array(10005,'1955-01-21','Kyoichi','Maliniak', 'M','1989-09-12'),
       5=>array(10006,'1953-04-20','Anneke','Preusig','F','1989-06-02')       5=>array(10006,'1953-04-20','Anneke','Preusig','F','1989-06-02')
Line 100: Line 100:
 $sql = 'select * from table'; $sql = 'select * from table';
  
 +// Does not work with PHP 5.3 or later, see workaround below
 $result = $db->execute($sql, false, "\$EMPNO==10005"); $result = $db->execute($sql, false, "\$EMPNO==10005");
  
Line 106: Line 107:
 } }
 </code> </code>
 +
 +===== Workaround =====
 +
 +For PHP 5.3 or later, the following workaround can be used (tested with ADOdb 5.20.15).
 +
 +Replace the ''$result = $db->execute($sql, false, "\$EMPNO==10005");'' statement in the above sample by the following code.
 +
 +<code php>
 +$db->evalAll = "\$EMPNO==10005";
 +$result = $db->execute($sql);
 +$db->evalAll = false;
 +</code>
 +
v5/database/text.txt · Last modified: 2020/01/13 13:17 by dregad