开发者

Trying to use MAX(): "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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜