Posted by grub3 on October 31, 2010 at 9:35pm
2 followers
Jump to:
| Project: | IP to Country |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
#1
Please 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!