Title: SQL error and duplicate function name
Last modified: August 22, 2016

---

# SQL error and duplicate function name

 *  [phillylovepark](https://wordpress.org/support/users/jjacques529/)
 * (@jjacques529)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/sql-error-and-duplicate-function-name/)
 * Hi,
 * My log is full of the same error coming from IP Base Login. Here it is:
    `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 'BETWEEN`start`AND`end`AND`status`
   = 1' at line 1 for the request SELECT * FROM wp_ip_based_login WHERE BETWEEN`
   start`AND`end`AND`status`= 1 done by require('wp-blog-header.php'), require_once('
   wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'),
   do_action('init'), call_user_func_array, triger_login, selectquery`
 * It seems the WHERE clause is empty, but I can’t figure out why. Could you please
   investigate ?
 * Also, the function getip() is already registered by another plugin that I have
   installed. Could you please change its name ?
 * Many thanks,
    Romain
 * [https://wordpress.org/plugins/ip-based-login/](https://wordpress.org/plugins/ip-based-login/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [brijeshk89](https://wordpress.org/support/users/brijeshk89/)
 * (@brijeshk89)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/sql-error-and-duplicate-function-name/#post-5875375)
 * Hi Romain,
 * Extremely sorry for the delay.
 * We will add a prefix for the function name in the next version so it should resolve
   the redeclare issue.
 * Also the empty values in the SELECT query is because of the same issue the WHERE
   clause should have the IP but since getip() function failed the variable has 
   empty value causing the syntax error in SELECT query.
 *  Thread Starter [phillylovepark](https://wordpress.org/support/users/jjacques529/)
 * (@jjacques529)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/sql-error-and-duplicate-function-name/#post-5875376)
 * Hi brijeshk89,
 * Thanks for your answer. I’ll wait for the update.
 * Have a good day.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘SQL error and duplicate function name’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ip-based-login.svg)
 * [IP Based Login](https://wordpress.org/plugins/ip-based-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip-based-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip-based-login/)
 * [Active Topics](https://wordpress.org/support/plugin/ip-based-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip-based-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip-based-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [phillylovepark](https://wordpress.org/support/users/jjacques529/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/sql-error-and-duplicate-function-name/#post-5875376)
 * Status: not resolved