nette/nette — Issue #566: Database\Selection escapovanie mysql funkcii
Author: stano
Created: 2012-02-29 08:28:38+00:00
State: open

Ahoj.

Ked som presiel z nette 2.0 na nette 2.0.1, tak mi prestal fungovat tento dotaz

$res = $em->table('tx_kiosmonada_term')
->select('datediff(from_unixtime(dateto), from_unixtime(datefrom)) AS noci, min(price) AS cena_od')
->where(tx_kiosmonada_util::enableFields('tx_kiosmonada_term'))
->where('pid', intval($stayUid))
->group('noci');

Zistil som, ze v novom nette zacalo escapovat aj nazvy mysql funkcii. Escapovanie `datediff` a `from_unixtime` este mysql rozdychalo, ale `min` uz vyhodilo chybu

SQLSTATE[42000]: Syntax error or access violation: 1630 FUNCTION monada1.min does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual

Skusal som to na mysql 5.1.49 a 5.5.16

Stano.