I have an ip stored in the database as an unsigned int but when i try and run this select i get a syntax error. i have tried both versions below.
SELECT `id`, INET_NTOA(`from`) AS from, INET_NTOA(`to`) AS to, `campaignid` FROM `customiplist` WHERE `campaignid` = 1
SELECT id, INET_NTOA(from) AS from, INET_NTOA(to) AS to, campaignid FROM customiplist WHERE campaignid = 1
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, INET_NTOA(`to`) AS to, `campaignid` FROM `customiplist` WHERE `campa' at line 1
i feel like i'm going mad because all the column names and table name is correct.