Hi everyone,
I'm having problem to call INET_ATON<http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#f...>function from select query builder. I tried COUNT function and it works and
return me correct number but not with INET_ATON
return $this->_em->createQueryBuilder()->select('COUNT(wl.startIP)')
->from('acl\models\entities\WhiteList', 'wl')
->getQuery()->getResult();
return $this->_em->createQueryBuilder()->select('INET_ATON(wl.startIP)')
->from('acl\models\entities\WhiteList', 'wl')
->getQuery()->getResult();
The errors I got is: *Message:* [Syntax Error] line 0, col 7: Error:
Expected known function, got 'INET_ATON
so I think Doctrine only accepts certain function like COUNT, REPLACE.
Anyone knows how I can make the query work? I don't know how to call or
contruct native query in this case, if you have a example how, please help.
Thanks for your inputs
- Nam