$c = new Criteria();
$c->addSelectColumn('MAX('.Moto::matricula.')');
But i get this error:
Fatal error: Undefined class constant 'matricula' in /opt/lampp/htdocs/ prueba/lib/model/MotoPeer.php on line 25.
Any idea?
开发者_高级运维I'm using symfony 1.4 and propel 1.4.
Regards
Javi
It means that the class "Moto" doesn't have a variable "matricula" in it. This does not seem to have anything to do with (my)sql, but more with the (php?) class you are using.
Check out the source of that Moto class, and look if you have made a typo in the constant name?
精彩评论