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

[eluser]Frenky.net[/eluser]
Now i see! The reason for this is quite simple. He's trying to get the number of login attempts.
Where others would return just one column, he isn't returning any data from the table.
He's just returning a static number, in this case 1.
This will speed up the selection proces as he isn't accessing a column. So he gets the same result but then quicker!

This is a strange way of doing:

Code:
SELECT COUNT(*) FROM `table` WHERE `column` = "value"

I think the count(*) is quicker, but i don't know for sure.
Hope this helps!


Messages In This Thread
What does this active record query do? -> db->select('1', false) - by El Forum - 12-13-2010, 06:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB