Title: SQL syntax error &#038; duplicate entry
Last modified: August 18, 2016

---

# SQL syntax error & duplicate entry

 *  [pcrproject](https://wordpress.org/support/users/pcrproject/)
 * (@pcrproject)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/sql-syntax-error-038-duplicate-entry/)
 * Hello,
    We received the following error messages over the weekend:
 * WordPress database error: [Duplicate entry ‘106451’ for key 1]
    INSERT INTO wp_bas_visitors(
   visit_ip, referer, osystem, useragent, lasthere) VALUES (644092098, 1, 1, 467,‘
   2007-07-09 13:58:05’);
 * WordPress database error: [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‘
   AND referer = referer_id AND osystem = os_id AND useragent = ua_]
    SELECT * FROM
   wp_bas_visitors, wp_bas_refer, wp_bas_ua, wp_bas_os WHERE visit_id = AND referer
   = referer_id AND osystem = os_id AND useragent = ua_id
 * WordPress database error: [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‘‘
   2007-07-09 13:58:05′, 0, 1)’ at line 1]
    INSERT INTO wp_bas_log (visit, stamp,
   outbound, page) VALUES (, ‘2007-07-09 13:58:05’, 0, 1);
 * Does this look like an upgrade issue? We’ve not upgraded to the new version(s)–
   could this be the problem? I don’t have a manual for the MySQL server.
 * Thank you,
    PCR Project

Viewing 1 replies (of 1 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/sql-syntax-error-038-duplicate-entry/#post-591831)
 * _Does this look like an upgrade issue?_
 * It looks like a plugin issue…
    **wp_bas_visitors ** – is not a WP table!

Viewing 1 replies (of 1 total)

The topic ‘SQL syntax error & duplicate entry’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/sql-syntax-error-038-duplicate-entry/#post-591831)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
