Active
Project:
IP to Country
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2010 at 21:35 UTC
Updated:
19 Nov 2011 at 22:22 UTC
Dear all,
$sql = "SELECT country FROM {ip2country}
WHERE (%d >= `ip_range_first` AND %d <= `ip_range_last`) LIMIT 1";This kind of quote does not exist in SQL 99 and will make any database fail, like PostgreSQL.
Instead, write:
$sql = "SELECT country FROM {ip2country}
WHERE (%d >= 'ip_range_first' AND %d <= 'ip_range_last') LIMIT 1";
Please apply.
Kind regards, Grub
Comments
Comment #1
mrfelton commentedPlease don't mark as ready to be committed when a) there is no patch, and b) no one else has reviewed the code except yourself!