Page 2 of 2

Posted: Thu Feb 22, 2007 11:36 am
by UrButtFullOfArr0ws
# result for "SELECT * FROM `accounts` WHERE `email` = 'b@b.com' AND `pass` = '1'": 0
Hmm...weird...it says i don't have any rows corresponding to that query when i know there's a row which contains b@b.com and 1 :?
So query is ok but, MySQL doesn't send back the data?

Thx.

Posted: Thu Feb 22, 2007 1:23 pm
by volka
UrButtFullOfArr0ws wrote:when i know there's a row which contains b@b.com and 1 :?
So query is ok but, MySQL doesn't send back the data?
It's more likely that there is no record having `email` = 'b@b.com' AND `pass` = '1'. May be as simple as a space or newline character you haven't noticed.

Posted: Thu Feb 22, 2007 1:34 pm
by RobertGonzalez
Provide the result for:

Code: Select all

SELECT * FROM `accounts`;
Including field header (or the field names).

Posted: Thu Feb 22, 2007 1:42 pm
by UrButtFullOfArr0ws
This is soooo embarassing... :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:
when i wanted to mark the results for the mysql query i noticed the password was 1234 not 1 :( :( becouse i entered a 4 letter requirement for the password through another registration form. I remembered i entered the first one manually and i entered 1...it looks like i was wrong... The problem however is solved now...first time i tried it didn't work with the correct pass either :?
Sorry :( :oops:

Posted: Thu Feb 22, 2007 2:44 pm
by RobertGonzalez
Its all good.

For future reference it is a good idea to echo our your SQL (in development of course, not production) so you can easily drop the SQL into your SQL administrator and see if you are actually getting back what you expect. In this case it would have saved you about a page and a half worth of posts. :wink: