[Typo3-dev] DBAL usage question

Arne Skjaerholt arnsholt at broadpark.no
Fri Apr 22 15:56:02 CEST 2005


> Meanwhile, what do you think about the question of my initial post: Is it ok 
> (concerning CGL and DBAL) to use
> 
> $res = $GLOBALS['TYPO3_DB']->sql($db, $query);
> 
> instead of the exec_*query functions?
If you really must, you can. But keep in mind that part of the idea
behind the DBAL is to let you change backend databases without having to
mess with the SQL code in your PHP code. using sql() will break this in
one swift stroke. I'd recommend using the exec family of methods to
perform queries on your DB.

Arne
:wq





More information about the TYPO3-dev mailing list