logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: PHP5 and MS SQL Server 2000?
Author
kr33



Joined: 19 Sep 2006
Posts: 64
Location: South Africa

PostPosted: Tue 28 Nov '06 11:29    Post subject: PHP5 and MS SQL Server 2000? Reply with quote

Hi,

I have reached the end of my web application development for my website....

Although now, theres a catch, I need to migrate ALL the data from MySQL to MS SQL Server as well as adjust my php scripts to access the MS SQL Server database.

I found out how to make the connection to MS SQL Server using php, but what I'd like to know is...

How much of a difference is there between the functions for MySQL and MS SQL Server...

Eg. to connect to the MS SQL Server, instead of mysql_connect($host, $username, $password);

i would now use :
mssql_connect($host, $username, $password)

among a few other familiar functions.

A more specific eg would be...inserting data into tables, truncate the tables, importing flat files(comma delimted CSV files) into the database tables
using php code.

ANY Help would be great!!!!

I hope i've explained properly.

Much Thanks

Ciao

Quote:
Every man has to go through hell...to reach his paradise...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 01 Dec '06 10:12    Post subject: Reply with quote

See http://www.php.net/msssql for any details
Back to top
kr33



Joined: 19 Sep 2006
Posts: 64
Location: South Africa

PostPosted: Fri 01 Dec '06 11:50    Post subject: Reply with quote

Thanks James...was of great help.

But other that the function changes, would my SQL querying still be the same or would i need to change that aswell?

Eg. when i update my database i do the following
Code:

         $uSql = "UPDATE $toTable, $fromTable SET $toTable.$fieldToUpdate = $fromTable.$tData ".
               "WHERE $toTable.row_position = $rowIndex[$sData] AND $fromTable.row_indx = $rowIndex[2]";
            
            $uResult = mysql_query($uSql)
               or die ("<br>Update Error : ".mysql_error());


The above was when I was using the mysql functions.
Will i now have to change the structure etc. for doing the update, etc.

Thanks

Quote:

A man's dream are an index to his greatness
Back to top


Reply to topic   Topic: PHP5 and MS SQL Server 2000? View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner