SQL Server works in CLI but not PDO -


i'm running this; sql that's outputted in die() works fine when copied , pasted console, it's throwing error

sqlstate[42000]: [microsoft][sql server native client 11.0][sql server]incorrect syntax near 'go'

when i'm running through pdo.

i'm connecting sql azure table.

any ideas? thanks.

try {    $conn = new pdo ("sqlsrv:server = tcp:nczf1z2h11.database.windows.net,1433; database = stonewashactions", "core", "exphaickyaleisudjak-");    $conn->setattribute(pdo::attr_errmode, pdo::errmode_exception); }  catch (pdoexception $e) {    //nada }  try {     $data = $conn->exec($finalstatement);  }  catch (exception $e) {   die($finalstatement); } 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -