[TYPO3-core] RFC #15457: Add support for prepared queries

Steffen Kamper info at sk-typo3.de
Thu Aug 19 11:48:42 CEST 2010


Hi,

hm - i tested the patch now.

Parse error: syntax error, unexpected ')' in 
C:\xampp\htdocs\tv\t3lib\db\class.t3lib_db_PreparedStatement.php on line 393

When i fix it i get

stmt_execute
String (22) 	caller 	t3lib_DB::stmt_execute
String (150) 	ERROR 	You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near ':pid' at line 1
String (36) 	lastBuiltQuery 	SELECT * FROM pages WHERE pid = :pid

I tested with provided example #1:
$content = '';
					$stmt = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('*', 'pages', 
'pid = :pid');
					$stmt->execute(array(':uid' => 2));
					while (($row = $stmt->fetch()) !== FALSE) {
						$content .= t3lib_div::view_array($row);
					}
					$stmt->free();
					return $content;

So what is wrong?

vg Steffen


More information about the TYPO3-team-core mailing list