note 71876 modified in ref.mssql by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 02:09:47 +0000 |
| Subject: | note 71876 modified in ref.mssql by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155626@lists.php.net to get a copy of this message | ||
Couple of notes:
When setting this up, you might notice that the unixODBC isql command likes the password wrapped in
single quotes:
isql -v MyDSN MyUserID 'MyPa$$W0rd'
Additionally, if you happen to have a dollar-sign in your password (or username, or DSN) -- you must
avoid using double quotes. This is a normal PHP gotcha, but worth mentioning.
Won't work:
<?php $con = mssql_connect ("MyDSN", "MyUserID", "MyPa$$W0rd");
?>
Will work (single quotes):
<?php $con = mssql_connect ("MyDSN", "MyUserID", 'MyPa$$W0rd');
?>
--was--
Couple of notes:
When setting this up, you might notice that the unixODBC isql command likes the password wrapped in
single quotes:
isql -v MyDSN MyUserID 'MyPa$$W0rd'
Additionally, if you happen to have a dollar-sign in your password (or username, or DSN) -- you must
avoid using double quotes. This is a normal PHP gotcha, but worth mentioning.
Won't work:
$con = mssql_connect ("MyDSN", "MyUserID", "MyPa$$W0rd");
Will work (single quotes):
$con = mssql_connect ("MyDSN", "MyUserID", 'MyPa$$W0rd');
http://php.net/manual/en/ref.mssql.php