[TYPO3-core] RFC #15457: Add support for prepared queries
Steffen Kamper
info at sk-typo3.de
Thu Aug 19 11:53:37 CEST 2010
Hi,
ok, even when i change it to $stmt->execute(array(':pid' => 2)); it 's
wrong sql, parameter isn't replaced.
testin 2nd example:
$content = '';
$stmt = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('uid, title',
'pages', 'pid = ?');
$pid = 1;
$stmt->bindParam(1, $pid);
$stmt->execute();
$pagesWithPid1 = $stmt->fetchAll();
$stmt->free();
$pid = 4;
$stmt->execute();
$pagesWithPid4 = $stmt->fetchAll();
$stmt->free();
return t3lib_div::view_array($pagesWithPid1) .
t3lib_div::view_array($pagesWithPid4);
i get
Fatal error: Call to undefined method
t3lib_db_PreparedStatement::bindParam() in
C:\xampp\htdocs\tv\typo3conf\ext\tester\mod1\index.php on line 184
please provide some examples work with this patch ;)
vg Steffen
More information about the TYPO3-team-core
mailing list