divinedesigns1 Posted July 11, 2012 Share Posted July 11, 2012 ok i ran into an error i can not figure out how to fix Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/content/14/8709614/html/phpalbums/func/user.func.php on line 9 and this is the code where the error started function login_check($email, $password){ $email = mysql_real_escape_string($email); $login_query = mysql_query("SELECT COUNT(`users_id`) as `count`, `users_id` FROM `users` WHERE email='$email' AND password='".md5($password)."'"); // the error starts belowreturn (mysql_result($login_query, 0) === 1) ? mysql_result($login_query, 0, `user_id`) : false;} the error started below where i placed a commentim trying to use that return(); to say if a person login info is true or false Link to comment Share on other sites More sharing options...
thescientist Posted July 11, 2012 Share Posted July 11, 2012 really?http://w3schools.invisionzone.com/index.php?showtopic=44106 Link to comment Share on other sites More sharing options...
divinedesigns1 Posted July 11, 2012 Author Share Posted July 11, 2012 ok let me rewrite that, after checking the mysql_result(); also checking the line the error started on, i could not figure out what i was doing wrong, therefore i came here to ask if someone can give me a hand to see if im typing something wrong or if i wrong something wrong, Link to comment Share on other sites More sharing options...
justsomeguy Posted July 11, 2012 Share Posted July 11, 2012 Yes, you wrong something wrong. Read the topic thescientist linked to. Every single time this error message appears it is the same problem. I still have faith that one of these days when you see this error message you're going to understand what it means without needing to post here about it (again). You even posted in that thread that you know how to fix these errors now. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted July 12, 2012 Author Share Posted July 12, 2012 Yes, you wrong something wrong. Read the topic thescientist linked to. Every single time this error message appears it is the same problem. I still have faith that one of these days when you see this error message you're going to understand what it means without needing to post here about it (again). You even posted in that thread that you know how to fix these errors now. yeah i always read the topic, i was over looking something in the query that wasnt suppose to be there, i got it fixed after moving away from the pc and coming back to it, pssssh once again it was a typoyeah since me too, since im able to fix many other errors without posting them here, which is a improvement. so typos going to be something i need to pay more attention too Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now