Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2004, 03:56 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP and SQL (NOT MYSQL)

Can somebody help me please.

I have never used PHP before and have been handed a work project to use PHP on an Apache web server but to connect to a SQL Server DB on a windows box.

All I need to do is read from and write to the DB using odbc. I come from an ASP background and i'm really struggling with the PHP.

Any help would be much appreciated.

 
Old July 21st, 2004, 04:14 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I'm not sure how much help you'll be able to get here. I don't think anyone answering questions has done anything with MS databases and PHP, I could be wrong. I assume that this is MS SQL?? There is a set of functions tailored for MS SQL specifically.

http://www.php.net/manual/en/ref.mssql.php

I just noticed a new *experimental* Dot NET extension to PHP that allows access to .NET objects from PHP.

http://www.php.net/manual/en/ref.dotnet.php

I've not delved much into .NET, so I dunno if that would be helpful at all. There's some interesting information in the notes there that would probably be of interest for someone coming from a .NET background... just an FYI.

If I were given this project I'd approach it using DB abstraction, in the event the boss should decide another RDBMS is better suited. That said, have a look at PEAR DB. This OOP package is suited for completely abstracting the DB, so that pure SQL can be used to run queries and such, it provides an interface to nearly every type of DB imaginable, including all the top ones, MySQL, MS SQL, ODBC, Oracle, PostgreSQL.

http://pear.php.net/DB

I also assume that this is *two* different machines?? You shuold be able to connect to the SQL server using that machine's IP and the port SQL server is configured to listen on, using either the built-in MS SQL functions or the PEAR DB package (which just wraps those functions).

Don't forget to read the user notes on the MSSQL page.. chances are someone else has already done what you're trying to do and have been kind enough to tell you how to do it.

HTH! Good luck!


Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::




Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL/PHP Help blackout Beginning PHP 1 August 8th, 2006 07:49 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
MySQL/PHP Gyhth PHP Databases 3 May 27th, 2005 08:21 PM
Using PHP with MySQL nav Beginning PHP 1 September 5th, 2004 04:02 AM
converting MySQL tables to SQL Server using PHP vishal148 Access 2 July 3rd, 2004 10:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.