Page 1 of 1

sql query

Posted: Fri Oct 02, 2009 7:16 pm
by lipun4u
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 ??

Re: sql query

Posted: Fri Oct 02, 2009 7:49 pm
by Griven
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.

Re: sql query

Posted: Fri Oct 02, 2009 7:49 pm
by jackpf
:google:

Re: sql query

Posted: Fri Oct 02, 2009 7:56 pm
by Griven
jackpf wrote::google:
Yeah, that too. It probably would have been faster.

Re: sql query

Posted: Fri Oct 02, 2009 8:00 pm
by jackpf
yeah lol

If there was a "read the manual" smiley, I would have posted that too :P

Re: sql query

Posted: Fri Oct 02, 2009 8:01 pm
by jackpf
Image
Best I could find.

Re: sql query

Posted: Fri Oct 02, 2009 8:31 pm
by lipun4u
A 9 year old kid knows google is everyone's friend. But I asked here because I have some problem with google....

Re: sql query

Posted: Sat Oct 03, 2009 4:35 am
by jackpf
...you have a problem with google?

...right.

Re: sql query

Posted: Sat Oct 03, 2009 4:59 pm
by Griven
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).

Re: sql query

Posted: Sat Oct 03, 2009 5:08 pm
by jackpf
lol