In my extension it would be very helpful to use a joint sql command instead of a series consecutive queries. However, it does not work. The sql commands are not accepted. Here is an example of the sql query I was using. I also tried using the TYPO3 system functions, but with no better results.
PHP-Code:
$order='t.element1';
$table='tx_myextension_table t, tx_myextension_index i';
$select='t.element1, t.element2, t.element3, i.index_name';
$query = 'SELECT '.$select.' FROM '.$table.' INNER JOIN '.$join.' WHERE '.$where.' ORDER BY '.$order;
$res = mysql(TYPO3_db,$query);
How can a implement a joint query under TYPO3 and what are the pitfalls here?
What was I doing wrong?