Jump to content

[SOLVED] not a valid MySQL-Link resource


maxudaskin

Recommended Posts

What would Cause this error?

 

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.grable/someurl/someurl.net/include/functions.php on line 10

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.grable/someurl/someurl.net/include/functions.php on line 11

Link to comment
Share on other sites

The error is:

 

Error: with query

 

Do you have to be a n00b?

Post lines 8 - 15 from include/functions.php

Then maybe we can see what could be causing the error? ::)

 

Well, I think that is too much to ask :P

 

require ("dbconnect.php");

function login($username,$password){
$md5pass = md5($password);
$sql = "SELECT * FROM users WHERE pid = '{$username}'";
$sql2 = "SELECT * FROM users WHERE pass = '{$md5pass}'";
$query = mysql_query($con,$sql) or die("Error: ". mysql_error(). " with query ". $query);
$query2 = mysql_query($con,$sql2) or die("Error: ". mysql_error(). " with query ". $query2);
if (!$query || (mysql_numrows($result) < 1)){
return 1;
}
elseif(!$query2 || (mysql_numrows($result2) < 1)){
return 2;
}
else
{
return 0;
}
}

 

dbconnect.php

 

<?php
$hostname_LeadHost = "[removed]";
$database_LeadHost = "[removed]";
$username_LeadHost = "[removed]";
$password_LeadHost = "[removed]";
$con = mysql_pconnect($hostname_LeadHost, $username_LeadHost, $password_LeadHost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db('[removed]', $con);
?>

Link to comment
Share on other sites

NO MATTER WHAT I DO OR WHAT I TRY, IT KEEPS TELLING ME THIS:

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.grable/vzoom/virtualzoom.net/include/functions.php on line 13

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.grable/vzoom/virtualzoom.net/include/functions.php on line 14

 

AND I AM ABOUT TO PULL MY

  • DARK BROWN
  • [PUT SWEARWORD HERE
  • GREYING FROM STRESS

HAIR BECAUSE I AM SO -- PISSED OFF WITH THIS SCRIPT.!!!

 

Edit

----------

 

Is there anything wrong with this?

$con = mysql_connect("mysql.blahblahblah.net", "admin","admin");
mysql_select_db("db", $con);
function login($username,$password){
   if(!get_magic_quotes_gpc()) {
$username = addslashes($username);
   }
$q = "select pid from users where pid = '$username'";
$q2 = "select pass from users where pid = '$username'";
$query = mysql_query($q,$con);
$query2 = mysql_query ($q2,$con);
if (!$query || (mysql_numrows($query) < 1)){
return 1;
}
elseif(!$query2 || (mysql_numrows($query2) < 1)){
return 2;
}
else
{
return 0;
}
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.