SQL Error in Tap Tap Revenge 4

如下所示,这个SQL没有做任何处理,当city出现 ‘ 这样的符号时,将会在客户端直接报出错误来。

INSERT INTO tapulous.users_location(
    device_id,
    ip_address,
    city,
    state,
    country,
    latitude,
    longitude,
    time,
    last_updated)
VALUES
(...)
ON DUPLICATE KEY UPDATE
    ip_address='',
    city='',
    state='',
    country='',
    latitude='',
    longitude='',
    last_updated=NOW()
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: