note 73178 added to function.mssql-query
| From: | chris7ian at gmail dot com | Date: | Mon, 12 Feb 2007 14:20:57 +0000 |
| Subject: | note 73178 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123278@lists.php.net to get a copy of this message | ||
Hi All,
I am trying to connect from PHP to a MS SQL DB and the code hang at the MSSQL_QUERY function. The
connection is ok, the select db is ok, the problem is when I try to get the "select * from
clients".
I just import the db to mysql and rename the mssql funtions to mysql and everything is working.
Any advice?
Regards,
Christian Tuohy
--the code ---
<?php
$db_conn = mssql_connect("MyServer2k","sa","za")
or die("ERROR: no se puede conectar al servidor");
mssql_select_db("Northwind",$db_conn) or
die ("ERROR: no se encuentra la base de datos");
$query_result = mssql_query("SELECT Categories.* FROM Categories") or die ("ERROR: no
se puede ejecutar la consulta");
while($result=mssql_fetch_assoc($query_result))
{
echo $result['CategoryName']."
".$result['Description']."<br>";
}
mssql_close($db_conn);
?>
-------
----
Server IP: 69.147.83.197
Probable Submitter: 200.73.29.7
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- https://master.php.net/note/edit/73178
Del: integrated -- https://master.php.net/note/delete/73178/integrated
Del: useless -- https://master.php.net/note/delete/73178/useless
Del: bad code -- https://master.php.net/note/delete/73178/bad+code
Del: spam -- https://master.php.net/note/delete/73178/spam
Del: non-english -- https://master.php.net/note/delete/73178/non-english
Del: in docs -- https://master.php.net/note/delete/73178/in+docs
Del: other reasons-- https://master.php.net/note/delete/73178
Reject -- https://master.php.net/note/reject/73178
Search -- https://master.php.net/manage/user-notes.php