Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Call INET_ATON from Doctrine
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nam Nguyen  
View profile  
 More options Sep 28 2012, 11:55 am
From: Nam Nguyen <gdb...@gmail.com>
Date: Fri, 28 Sep 2012 08:55:41 -0700 (PDT)
Local: Fri, Sep 28 2012 11:55 am
Subject: Call INET_ATON from Doctrine

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »