Re: ODBC/MSSQL Connect function
| From: | Justin Patrin | Date: | Mon, 08 Dec 2003 21:00:26 +0000 |
| Subject: | Re: ODBC/MSSQL Connect function | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22337@lists.php.net to get a copy of this message | ||
Harpreet wrote:
I use the below function string to connect to the database. mssql_connect($_SESSION["hostname"],$_SESSION["user"],$_SESSION["password"]) now if i want to connect using the odbc_connect function do i have to change all my mssql_fetch_array and mssql_query functions too. Please help Thanks Regards, Harpreet KaurYes, that's the way that the database functions work, unfortunately. However, there is a solution. If you use a database abstraction class, you can use the same code for many types of databases. One such is PEAR's DB. (http://pear.php.net/package/DB). You could also use PEAR's MDB and the ADODB PHP package. -- paperCrane <Justin Patrin>