[FilterScript] Dynamic MySQL GPS System
#8

First and foremost, escape any input given by players.

https://github.com/CaptainBoi/Dynami...system1.1#L205
Only column `LocationName` is selected but you try to retrieve position:
https://github.com/CaptainBoi/Dynami...1.1#L216-#L218
when these three columns are not in select expression.

pawn Code:
WHERE `S.No` > -1 LIMIT 10
LIMIT without ORDER BY selects random rows if there are more than 10 locations. Option says "You can see all the available GPS locations." but you still limit it to only 10 results. Also group it by `S.No` column.

You forgot to delete cache: https://github.com/CaptainBoi/Dynami...system1.1#L155

Another problem is that you do not rely on affected rows and these can fail:
https://github.com/CaptainBoi/Dynami...1.1#L156-#L160
https://github.com/CaptainBoi/Dynami...1.1#L169-#L173

It will send a message that I have added location in my gps even if I input anything greater than 100 characters which results in Error in query (1406): Data too long for column.
It will send a message that I have removed gps location even if the location name does not exist.

Since you select based on location name, set it as INDEX.

Good to see the global option DUPLICATE_CONNECTIONS in use.
Reply


Messages In This Thread
Dynamic MySQL GPS System - by CaptainBoi - 07.11.2018, 15:50
Re: Dynamic MySQL GPS System - by xRadical3 - 07.11.2018, 21:07
Re: Dynamic MySQL GPS System - by KinderClans - 07.11.2018, 21:10
Re: Dynamic MySQL GPS System - by Deadpoop - 07.11.2018, 23:14
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 05:58
Re: Dynamic MySQL GPS System - by jmembrey - 08.11.2018, 06:04
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 06:24
Re: Dynamic MySQL GPS System - by Calisthenics - 08.11.2018, 07:50
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 08:39
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 09:12
Re: Dynamic MySQL GPS System - by Calisthenics - 08.11.2018, 09:21
Re: Dynamic MySQL GPS System - by ZigGamerx - 08.11.2018, 10:45
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 11:20
Re: Dynamic MySQL GPS System - by CaptainBoi - 08.11.2018, 13:20
Re: Dynamic MySQL GPS System - by Venom546 - 09.11.2018, 15:12
Re: Dynamic MySQL GPS System - by CaptainBoi - 09.11.2018, 16:25
Re: Dynamic MySQL GPS System - by Wherethescripters - 10.11.2018, 15:23
Re: Dynamic MySQL GPS System - by CaptainBoi - 18.11.2018, 13:42
Re: Dynamic MySQL GPS System - by CaptainBoi - 11.01.2019, 14:17
Re: Dynamic MySQL GPS System - by N0FeaR - 11.01.2019, 15:59
Re: Dynamic MySQL GPS System - by Usmanmemon - 12.01.2019, 18:24
Re: Dynamic MySQL GPS System - by CaptainBoi - 13.01.2019, 03:21

Forum Jump:


Users browsing this thread: 1 Guest(s)