[TYPO3-mvc] Transition Guide for Persistance Rewrite

Jochen Rau jochen.rau at typoplanet.de
Mon Aug 3 23:30:02 CEST 2009


Hi.

> I am working on a solution for "raw" statements. My current sketch is
> (inside the Repository class):
>
> $query = $this->createQuery('Tx_BlogExample_Domain_Model_Blog');
> $query->statement(
> 'SELECT * FROM tx_blogexample_domain_model_blog WHERE
> SUBSTRING(title,1,1) LIKE BINARY 'B' AND description LIKE
> '%blog%' ORDER BY title ASC');
> $result = $query->execute();

I'd like to change this to

$query->statement('SELECT * FROM tx_blogexample_domain_model_blog WHERE 
SUBSTRING(title,1,1) LIKE BINARY '?' AND description LIKE '%?%' ORDER BY 
title ASC', array('B', 'blog));

to enable prepared statements in the Storage Backend.

Regards
Jochen

-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list