Re: [PHP] question about using sql server with php
Sorry, that was a typo. I meant MSSQL. On Mon, Oct 27, 2008 at 2:12 PM, Chris <[EMAIL PROTECTED]> wrote: > Robbert van Andel wrote: > >> You also need to make sure that your server has the mysql drivers >> installed. A linux server does not come with this support natively. >> > > He's not using mysql, he's using sql server. > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > >
Re: [PHP] question about using sql server with php
We use a linux webserver but have a need to connect to MSSQL databases. Since I used Fedora, I was lucky enough to find the PHP-MSSQL package but that has only been available via yum recently. My first attempt at connecting to MSSQL was much more difficult when I was using FC3. On Mon, Oct 27, 2008 at 2:02 PM, Ashley Sheridan <[EMAIL PROTECTED]>wrote: > On Mon, 2008-10-27 at 07:41 -0700, Robbert van Andel wrote: > > You also need to make sure that your server has the mysql drivers > > installed. A linux server does not come with this support natively. > > > > On Mon, Oct 27, 2008 at 6:19 AM, bruce <[EMAIL PROTECTED]> wrote: > > > > > hey sudhakar.. > > > > > > when you're changing database apps, you're normally going to have to > change > > > the connection codem as well as possibly the query structure for your > > > different select/insert/etc.. queries. > > > > > > there should be plenty of examples/tutorials on the net, as well as in > the > > > php.net website. > > > > > > have fun! > > > > > > > > > -Original Message- > > > From: Sudhakar [mailto:[EMAIL PROTECTED] > > > Sent: Sunday, October 26, 2008 8:49 PM > > > To: php-general@lists.php.net > > > Subject: [PHP] question about using sql server with php > > > > > > > > > i have a question about how to use sql database with php instead of > using > > > my > > > sql database > > > > > > when i use my sql database the php code to connect to the my sql > database > > > is > > > = > > > > > > $conn = mysql_connect($hostname, $user, $password); > > > > > > if(!$conn) > > > { > > > echo "Unable to connect to Database"; > > > } > > > > > > else > > > { > > > mysql_select_db($database, $conn); > > > > > > $query = mysql_query($selectquery); > > > > > > mysql_close($conn); > > > } > > > > > > > > > if i have to connect to a sql databse instead of my sql database as > some > > > companies use sql database, how can i change the php code to connect, > run a > > > query and close connection to the sql database. > > > > > > apart from changing the code to connect to sql database is there > something > > > else i need to do. > > > > > > please advice. > > > > > > thanks > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > What distribution are you using for your server, as every distro I've > ever touched has them. Also, the question was regarding connection to a > mssql database, not mysql. As he didn't specify the operating system, > I'm going out on a limb by thinking the PHP was on a Windows web server > (who would run PHP on a Linux web server to then use the inferior mssql > database?) > > > Ash > www.ashleysheridan.co.uk > >
Re: [PHP] question about using sql server with php
Robbert van Andel wrote: You also need to make sure that your server has the mysql drivers installed. A linux server does not come with this support natively. He's not using mysql, he's using sql server. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about using sql server with php
On Mon, 2008-10-27 at 07:41 -0700, Robbert van Andel wrote: > You also need to make sure that your server has the mysql drivers > installed. A linux server does not come with this support natively. > > On Mon, Oct 27, 2008 at 6:19 AM, bruce <[EMAIL PROTECTED]> wrote: > > > hey sudhakar.. > > > > when you're changing database apps, you're normally going to have to change > > the connection codem as well as possibly the query structure for your > > different select/insert/etc.. queries. > > > > there should be plenty of examples/tutorials on the net, as well as in the > > php.net website. > > > > have fun! > > > > > > -Original Message- > > From: Sudhakar [mailto:[EMAIL PROTECTED] > > Sent: Sunday, October 26, 2008 8:49 PM > > To: php-general@lists.php.net > > Subject: [PHP] question about using sql server with php > > > > > > i have a question about how to use sql database with php instead of using > > my > > sql database > > > > when i use my sql database the php code to connect to the my sql database > > is > > = > > > > $conn = mysql_connect($hostname, $user, $password); > > > > if(!$conn) > > { > > echo "Unable to connect to Database"; > > } > > > > else > > { > > mysql_select_db($database, $conn); > > > > $query = mysql_query($selectquery); > > > > mysql_close($conn); > > } > > > > > > if i have to connect to a sql databse instead of my sql database as some > > companies use sql database, how can i change the php code to connect, run a > > query and close connection to the sql database. > > > > apart from changing the code to connect to sql database is there something > > else i need to do. > > > > please advice. > > > > thanks > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > What distribution are you using for your server, as every distro I've ever touched has them. Also, the question was regarding connection to a mssql database, not mysql. As he didn't specify the operating system, I'm going out on a limb by thinking the PHP was on a Windows web server (who would run PHP on a Linux web server to then use the inferior mssql database?) Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about using sql server with php
You also need to make sure that your server has the mysql drivers installed. A linux server does not come with this support natively. On Mon, Oct 27, 2008 at 6:19 AM, bruce <[EMAIL PROTECTED]> wrote: > hey sudhakar.. > > when you're changing database apps, you're normally going to have to change > the connection codem as well as possibly the query structure for your > different select/insert/etc.. queries. > > there should be plenty of examples/tutorials on the net, as well as in the > php.net website. > > have fun! > > > -Original Message- > From: Sudhakar [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 26, 2008 8:49 PM > To: php-general@lists.php.net > Subject: [PHP] question about using sql server with php > > > i have a question about how to use sql database with php instead of using > my > sql database > > when i use my sql database the php code to connect to the my sql database > is > = > > $conn = mysql_connect($hostname, $user, $password); > > if(!$conn) > { > echo "Unable to connect to Database"; > } > > else > { > mysql_select_db($database, $conn); > > $query = mysql_query($selectquery); > > mysql_close($conn); > } > > > if i have to connect to a sql databse instead of my sql database as some > companies use sql database, how can i change the php code to connect, run a > query and close connection to the sql database. > > apart from changing the code to connect to sql database is there something > else i need to do. > > please advice. > > thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
RE: [PHP] question about using sql server with php
hey sudhakar.. when you're changing database apps, you're normally going to have to change the connection codem as well as possibly the query structure for your different select/insert/etc.. queries. there should be plenty of examples/tutorials on the net, as well as in the php.net website. have fun! -Original Message- From: Sudhakar [mailto:[EMAIL PROTECTED] Sent: Sunday, October 26, 2008 8:49 PM To: php-general@lists.php.net Subject: [PHP] question about using sql server with php i have a question about how to use sql database with php instead of using my sql database when i use my sql database the php code to connect to the my sql database is = $conn = mysql_connect($hostname, $user, $password); if(!$conn) { echo "Unable to connect to Database"; } else { mysql_select_db($database, $conn); $query = mysql_query($selectquery); mysql_close($conn); } if i have to connect to a sql databse instead of my sql database as some companies use sql database, how can i change the php code to connect, run a query and close connection to the sql database. apart from changing the code to connect to sql database is there something else i need to do. please advice. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about using sql server with php
if i have to connect to a sql databse instead of my sql database as some companies use sql database, how can i change the php code to connect, run a query and close connection to the sql database. apart from changing the code to connect to sql database is there something else i need to do. RTFM? http://www.php.net/mssql -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php