Importing PHP into MSSQL 7.0

  • How does one do it? I work for a tiny non-profit which bought a DB designed with PHP. We received the DB yesterday to load onto our 7.0 server, but all the files are php. Do I have to install mysql to make this work? Any and all suggestions/hints/help is sooooo appreciated.

    Thanks for reading,

    Todd

  • Hi Todd,

    quote:


    How does one do it? I work for a tiny non-profit which bought a DB designed with PHP. We received the DB yesterday to load onto our 7.0 server, but all the files are php. Do I have to install mysql to make this work? Any and all suggestions/hints/help is sooooo appreciated.


    I don't know very much about PHP. I'm actually learning it at the moment. a good starting point for php related questions is http://php.net .

    But from what I know is that you don't need MySQL. PHP4 integrates with IIS and configures it automatically for you to run php scripts. Also there are quite a few builtin functions in php for SQL7 and SQL2k.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • There is a utility called Mascon by Scibit (www.Scibit.com) which allows you to port the data/tables to text file.

    You can then use DTS or BULK INSERT to load it into MS SQL.

    It also scripts the tables etc.

    Cheers,

    Crispin

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • ???,

    was the question how to get php working with SQL7 or how to create a SQL db when the scripts are all in php?

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Frank,

    I guess, both? I've a functional MSSQL 7.0 machine. I've a bunch of php scripts which comprise a DB. I'd like to import the php scripts into mssql 7.0 to create a new db.

  • Hi Todd,

    quote:


    I guess, both? I've a functional MSSQL 7.0 machine. I've a bunch of php scripts which comprise a DB. I'd like to import the php scripts into mssql 7.0 to create a new db.


    so, is installing php a considerable solution?

    I don't know the tool, Crispin mentioned, but another workaround could be as you've originally mentioned to temporarily install MySQL and use PhpMyAdmin (or MySQLFront) or MySQL's dump... functionality to create *.sql script to you can run against SQL Server. Might be very time consuming!

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Hrm. Okay, PHP is like ASP or JSP. It's a scripting language designed to present web pages. It's not an actual database. With that said, it wouldn't surprise me if the PHP files you received were designed to be installed on a web server with PHP support and you built the database based on selections from said web site automatically. With that said...

    PHP does have the capability to connect to multiple types of databases. However, and this is a big one, the way it connects to a database typically depends on the TYPE of database. For instance:

    Commands to connect to MySQL:

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

    Commands to connect to Oracle 7 and 8:

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

    Now, there are calls based on ODBC, for instance:

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

    If that's the case, you should be all set. But you first have to figure out what database (if they were specific) the scripts are designed to access. The typical one is MySQL, but it's not always the case.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • quote:


    ...I've a bunch of php scripts which comprise a DB. I'd like to import the php scripts into mssql 7.0 to create a new db.

    ...


    Go ahead and post a sample PHP script. It will help in determining what exactly you need to do...

    Jay

  • Hello Todd,

    another thought that came to my mind is, that - assuming a 'good' programming - all stuff that is needed to built the new db should be placed in one single file. As Jay suggested, if possible you should post some code here.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply