PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
lipun4u
Forum Commoner
Posts: 82 Joined: Wed Jul 01, 2009 3:35 am
Location: Mumbai
Contact:
Post
by lipun4u » Fri Oct 02, 2009 7:16 pm
Just look at the query
Code: Select all
select user,password from users
where user='". mysql_real_escape_string($user)."'
and password='". mysql_real_escape_string($pw)."'
limit 1';
What does 'limit 1' means ??
Griven
Forum Contributor
Posts: 165 Joined: Sat May 09, 2009 8:23 pm
Post
by Griven » Fri Oct 02, 2009 7:49 pm
That means that the maximum number of records it can return is 1.
LIMIT 2 will return a maximum of 2 records, and so on.
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Fri Oct 02, 2009 7:49 pm
Griven
Forum Contributor
Posts: 165 Joined: Sat May 09, 2009 8:23 pm
Post
by Griven » Fri Oct 02, 2009 7:56 pm
jackpf wrote:
Yeah, that too. It probably would have been faster.
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Fri Oct 02, 2009 8:00 pm
yeah lol
If there was a "read the manual" smiley, I would have posted that too
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Fri Oct 02, 2009 8:01 pm
Best I could find.
lipun4u
Forum Commoner
Posts: 82 Joined: Wed Jul 01, 2009 3:35 am
Location: Mumbai
Contact:
Post
by lipun4u » Fri Oct 02, 2009 8:31 pm
A 9 year old kid knows google is everyone's friend. But I asked here because I have some problem with google....
Last edited by
lipun4u on Sat Oct 03, 2009 4:39 am, edited 1 time in total.
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Sat Oct 03, 2009 4:35 am
...you have a problem with google?
...right.
Griven
Forum Contributor
Posts: 165 Joined: Sat May 09, 2009 8:23 pm
Post
by Griven » Sat Oct 03, 2009 4:59 pm
jackpf wrote: ...you have a problem with google?
...right.
Hey, Google can be an @sshole--especially if he's been hitting the bottle. I've had some really bad problems with him in the past. I even had to disappear for a while at the BSBS (Bing Shelter for Battered Searchers).
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Sat Oct 03, 2009 5:08 pm
lol