I’m connecting to my MSSQL database remotely using PHP, MSSQL with FreeTDS by a CentOS cPanel Hosting.
And I’m getting this error, couldn’t fixed after trying hours and hours…
Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in /home/mrcskncn/public_html/process.php on line 71
Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in /home/mrcskncn/public_html/process.php on line 72
Here is the deal:
$dbc = mssql_connect($datasource, $datauser, $datapass) or die('Dam server!');
$selected = mssql_select_db($database, $dbc) or die('Dam db!');
$query_verify_account = "SELECT * FROM USER WHERE AccountID = '$Account'";
$qry = mssql_query($dbc, $query_verify_account);
$line = mssql_fetch_array($qry);
if (isset($line["AccountID"])) {
echo "This username is not available.";
}
What should I do?
Thanks
You need to switch the parameters around in your call to mssql_query()