logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: connecting SQL server on W and PHP/MYSQL on Unix: msg#00049

db.mysql.odbc

Subject: Re: connecting SQL server on W and PHP/MYSQL on Unix

lalit jairath wrote:
Hi Mike,
 
So is it possible to communicate both ways- accessing MSSQL from MySQL (unix machine) as well as MySQL from MSSQL. I'm more interested in accessing MSSQL server from MySQL.
 
Could you  please point me to a detailed doc/code. I'm not very familiar with MSSQL (un)fortunately.
 
Thank you much.
 
Lalit
  
MySQL can't talk to MS SQL directly.
You have to do the communication via a language which has drivers for both. I use the FreeTDS libraries to talk to SQL Server from both Perl and PHP.
It works in the limited cases I've had to do it in, but note that you can't run cross-database queries ... MS Access is the only app I know of that lets you do that.

As for examples, if you can talk to MySQL in Perl, then it's exactly the same deal with SQL Server.
Under PHP, it's a little different. There are separate, db-specific functions, eg:

MySQL:
mysql_connect, mysql_query, mysql_fetch_array

SQL Server:
mssql_connect, mssql_query, mssql_fetch_array

Pretty annoying if you want to move your data elsewhere. There are a couple of wrappers around php's db functions that give you a db-neutral set of tools. I think one of them is ADODB ( not to be confused with M$'s ADO / ADODB stuff ). Have a look at it if you don't want pain when migrating your data.

For speed ( query speed and development speed ) I recommend having all your data in one database, or at the least all of the data that is typically queried together. Running queries against multiple DBs is a major pain, inefficient, and yucky.

Dan

--
sig Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@xxxxxxxxxxxxxxxxxxxx
website: http://www.nusconsulting.com.au
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@xxxxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo