I am trying to use this SQL:
SELECT * FROM `mydata` WHERE `words` REGEXP CONCAT('[',UNHEX('e3'),'-',UNHEX('e9'),']')
I would like to use the REGXP and CONCAT functions. I would like to use ORM and keep the convenience of relations.
$f_kanji = Model_Friend::query()
->related('user')
->related('friend')
->related('friend.photo')
->where('user.username','REGXP',DB::expr("CONCAT('[',UNHEX('e3'),'-',UNHEX('e9'),']')"))
->where('user.username','=',$username)
->get();
I get the error on the part of REGXP ... I was hoping if there is something needed.
Thanks.
It looks like you're new here. If you want to get involved, click one of these buttons!