내 사이트 및 mssql 데이터베이스와의 연결을 설정하려고합니다. 데이터베이스에 연결할 수는 있지만 SQL 쿼리를 실행할 수 없습니다. 내 코드이 코드는 오류를PHP mssql_connect() Azure 데이터베이스에
Reference to database and/or server name in 'my_database.dbo.table' is not supported in this version of SQL Server.
을 보여줍니다하지만 온라인이 쿼리를 실행할 때, URL을 관리하고,이 오류가 발생하지 않습니다 링크
$connection = mssql_connect('jass8l1.database.windows.net', 'username', 'password');
if (!$connection){
print_r(mssql_get_last_message());
}else{
$res= mssql_query('SELECT * FROM [my_database].[dbo].[table]', $connection);
print_r(mssql_get_last_message());
$row = mssql_fetch_array($res);
echo $row[0];
}
입니다. 이 문제를 어떻게 해결할 수 있습니까? PHP 용 추가 드라이버가 필요합니까?
정규화 된 테이블 이름없이'SELECT * FROM table'을 시도 했습니까? –
예,'SELECT * FROM table'을 시도하면 '잘못된 객체 이름 'table'이 생깁니다. ' –