Welcome Guest, Not a member yet? Register   Sign In
What does this active record query do? -> db->select('1', false)
#11

[eluser]Frenky.net[/eluser]
[quote author="pyrokinesis" date="1292281102"]But this is the query in the profiler:
Code:
SELECT 1
FROM (login_attempts)
WHERE `ip_address` = '100.100.100.100'

so it's looking for a column called 1? I don't get it Sad[/quote]

It is NOT asking for a column, it is asking for a number. The guy who programmed this did not know how to use count(*) or something like it. So it returned all the rows with just the '1'.

It's just like weg you do math with sql: example here




Theme © iAndrew 2016 - Forum software by © MyBB