We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

PHQL what wrong with it

SELECT c.id AS id,d.id AS MsgId, d.MsgType AS MsgType ,d.FromUserName AS FromUserName,d.ToUserName AS ToUserName,c.Reply AS Reply ,c.ReplyMsgId AS ReplyMsgId FROM Message c LEFT JOIN Textmessage d ON d.id=c.MsgId WHERE c.id = $id LIMIT 1

above is my phql ,but debug.log display the SQL:[INFO] SELECT c.id AS id, d.id AS MsgId, d.MsgType AS MsgType, d.FromUserName AS FromUserName, d.ToUserName AS ToUserName, c.Reply AS Reply, c.ReplyMsgId AS ReplyMsgId FROM message AS c LEFT JOIN textmessage AS d ON d.id = c.MsgId WHERE id = 2 LIMIT 1

notice: where id ,that need c.id not id, is it bug ?



524

my phalcon version is 1.5

Hi,

you write c.id AS id, so i think in where clause is used alias for c.id. Do you get some error from database?

PS: Where can i find something about phalcon 1.5 :)