note 108075 added to book.mssql

From: Date: Tue, 27 Mar 2012 10:05:07 +0000
Subject: note 108075 added to book.mssql
Groups: php.notes 
Request: Send a blank email to php-notes+get-186832@lists.php.net to get a copy of this message
Dear All, I have problem to connect php 5.3.5 with sql server 2005. I have copy the ext. sql server 2005 driver for it php and configure the php.ini and restart the apache, but still got error Fatal error: Call to undefined function mssql_connect() in D:\xampp\htdocs\sqlserver\index.php on line 10 herewith i send my code, thanks for your help <?php $serverName = "127.0.0.1,1433"; $userName = "sa"; $password = "Google1"; $dbName = "contoh"; //$server = "SERVER\INSTANCE"; $connectionInfo = array("Database"=>"contoh", "UID" => "sa", "PWD" => "Google1"); $conDb = mssql_connect($serverName,$connectionInfo); // menyatakan pernyataan SQL yang akan meng-query data $strSql = "SELECT id, name, year FROM cars"; //Jalankan query SQLnya $result = mssql_query($strSql); $numRows = mssql_num_rows($result); echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>"; //Tampilkan hasil query while($row = mssql_fetch_array($result)) { echo "<li>" . $row["id"] . $row["name"] . $row["year"] . "</li>"; } //Tutup koneksi mssql_close($conDb); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 65.49.14.74 ---- Manual Page -- http://www.php.net/manual/en/book.mssql.php Edit -- https://master.php.net/note/edit/108075 Del: integrated -- https://master.php.net/note/delete/108075/integrated Del: useless -- https://master.php.net/note/delete/108075/useless Del: bad code -- https://master.php.net/note/delete/108075/bad+code Del: spam -- https://master.php.net/note/delete/108075/spam Del: non-english -- https://master.php.net/note/delete/108075/non-english Del: in docs -- https://master.php.net/note/delete/108075/in+docs Del: other reasons-- https://master.php.net/note/delete/108075 Reject -- https://master.php.net/note/reject/108075 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186832) next »