Re: Compiling PHP for MS SQL Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Barry Smith wrote:
> People:
>
> Let's get real here.
>
> M$ is a commercial entity that views most of it's objects 
> and interfaces as proprietary product.
>
> Linux, PHP, and almost everything distributed under GPL 
> is not a commercial entity, or usually has no cost associated.
>
> I've heard of Ubuntu, but I'm not sure whether it is GPL 
> or not... which doesn't matter, because PHP is GPL... and 
> in this case, distributed under a possible license with 
> Ubuntu.
>
>   
I don't understand how any of the above is relevant. So MSSQL is a
proprietary product. So what, you can still use PHP to get at and use
MSSQL databases.
Nearly a year ago I wrote a few applications for a client that do
exactly this, granted not on Ubuntu but on Slackware.
> If I remember enough of the config that you need, MS SQL 
> can be accessed for input by ODBC... but I've never 
> worked with an PHP/M$ $QL mix.
>
>   
I did straight PHP/MSSQL calls rather than add the complexity of ODBC to
my mix mentioned above.
Something similar to the following is all that is needed in the application.
<?php
    $link = mssql_connect("localhost", "sa", "")
        or die('Could not connect: ' . mssql_error());
    mssql_select_db("Jack2", $link) or die('Could not select database');
    $SQL = "Select mac_name, a_date, a_time, amnt, message_descr,
message_id from JACKPOT_REGISTER where message_id = 34 or message_id =
35 order by a_date desc, a_time desc";
    $rs = mssql_query($SQL, $link) or die('Query failed: ' .
mysql_error());
 etc etc

-- 
Regards,
Alf Stockton		www.stockton.co.za
 
Q:	Why is it that the more accuracy you demand from an interpolation
	function, the more expensive it becomes to compute?
A:	That's the Law of Spline Demand.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux