开发者

Trying to use MAX(): "Fatal error: Undefined class constant"

开发者 https://www.devze.com 2023-02-03 12:31 出处:网络
$c = new Criteria(); $c->addSelectColumn(\'MAX(\'.Moto::matricula.\')\'); But i get this error: Fatal error: Undefined class constant
$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?

0

精彩评论

暂无评论...
验证码 换一张
取 消