Posts Tagged ‘iOS’

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()