misc. functions in mysql
Tue, 06/07/2011 - 01:11
Hello, and I apologize in advance if this question has been raised but I have searched and cannot find direction.
I have a table (db.sites) with col (db.sites.ipaddr), and per best practices with MySQL it is defined as INT(11). My intention is to use the INET_NTOA and INET_ATON functions in MySQL so example queries would be:
SELECT id, INET_NTOA(ipaddr) AS ipaddr FROM sites;
INSERT INTO sites (ipaddr) VALUES (INET_ATON('192.168.0.1'));How do I set this in QCubed when the function names are different based on the query type for the same column?

I don't understand what you're trying to do. Looks like you're attempting to store IP addresses as integers; what is it that you want to have QCubed do on top of that?
If you want QQuery to run the INET_ATON() function before executing any of your queries, that's not supported; a workaround would be to use a PHP version of the INET_ATON() function - and pre-convert the IP address into an int before sending it over to your database.