So, I have repeatedly reentered the mySQL query and I been getting the same error every time. I have used the myPHPAdmin and copied the code directly and I'm still getting an error.
and this is what I copied from mySQL
I am getting nowhere with this thing. Every forum I go to says that its a bad query. But, when I run the code in myPHPAdmin it runs it with no problems. Yet, when I plug it in my php code it hates it...
Any suggests my fellow PHP guys?
Code:
SELECT * FROM `users` WHERE `usern` = 'jeff.lewis' AND `passw` = '1f3870be274f6c49b3e31a0c6728957f' LIMIT 0 , 30
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/j/e/l/jelew1985/html/nfm/Config/NFM-Functions.php on line 63
I am sorry there seems to be a problem with given credentials. This is the error that is given to me: - Charlie
and this is what I copied from mySQL
PHP:
$sql = 'SELECT * FROM `users` WHERE `usern` = \ 'jeff.lewis\' AND `passw` = \'1f3870be274f6c49b3e31a0c6728957f\' LIMIT 0, 30 ';
I am getting nowhere with this thing. Every forum I go to says that its a bad query. But, when I run the code in myPHPAdmin it runs it with no problems. Yet, when I plug it in my php code it hates it...
PHP:
function UserPass($username,$password) {
global $SQLC;
$password=md5($password);
$SQLQ = "SELECT * FROM `users` WHERE `usern` = 'jeff.lewis' AND `passw` = '1f3870be274f6c49b3e31a0c6728957f' LIMIT 0 , 30";
echo $SQLQ;
$SQLR=mysql_query($SQLQ, $SQLC)
or die("I am sorry there seems to be a problem with given credentials. This is the error that is given to me: \n\n".mysql_error()."\n\n- Charlie");
while($SQLO = mysql_fetch_array($SQLR, MYSQL_ASSOC))
{
$UID = $SQLO['uid'];
}
return false;
}
Any suggests my fellow PHP guys?