我通过CentOS cPanel Hosting使用PHP,MSSQL与FreeTDS远程连接我的MSSQL数据库。
我收到了这个错误,经过几个小时的努力后无法修复......
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
这是交易:
$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.";
}
我该怎么办?
由于
答案 0 :(得分:0)
您需要在调用mssql_query()
时切换参数$qry = mssql_query($query_verify_account, $dbc);