Archived

This topic is now archived and is closed to further replies.

cgi scripts

This topic is 5003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

if cgi scripts, such as a PHP script, are used to enable programs to communicate with each other, how does, say, a MySQL database communicate with a C++ program across a network?

Share this post


Link to post
Share on other sites
It''s the other way around. A MySQL db is a server. A client written in C++ (or whatever) connects across the network to the server to run queries.

Share this post


Link to post
Share on other sites
Using....? how does a client access the server with SQL queries? Text strings? :

string* str = "SELECT * FROM MyDatabase";
query_mysql(str);

How would the query_mysql() function work? This is what I really meant to be asking, I just didn''t word it properly. Sorry!

Share this post


Link to post
Share on other sites
ODBC

Your client app, be it asp/.net, php, C++, VB etc connects to the ODBC driver, the ODBC driver connects to a local or remote DB. Most ODBC drivers give ANSI-92 functionality plus a number or proprietary commands. EG. MS SQL ODBC driver connects to remote server over a couple of TCP/IP ports. You just need to communicate with the ODBC driver and let it worry about all the other stuff.

(I think Java uses similar JDBC, but not my area of expertise.)

Jay

Share this post


Link to post
Share on other sites
quote:
Original post by Jason Zelos
I think Java uses similar JDBC, but not my area of expertise.



Correct. I''ve used it a few times, and it''s quite similar.

Grant Palin

Share this post


Link to post
Share on other sites