Hi guys,
I use database translation and I had an error when use "exists" function from Phalcon\Translate\Adapter\Database.
public static function getTranslation()
{
return new \Phalcon\Translate\Adapter\Database( [ 'db' => \Phalcon\DI\FactoryDefault::getDefault()->getShared('db'), 'table' => 'translations', 'language' => Utils::getLanguage() ]);
}
$t = self::getTranslation()->exists('foo');
result :
SQLSTATE[42000]: Syntax error or access violation: 1064 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 '0' at line 1
I just remove "0" line 95 and it works.
It's a bug or I use it badly ?