473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

hi how to send sql query to remote server.

44
Hi,
I want to make online registration script. To do this I searched google and found that cURL can be used, to send a query to the remote sever and getting the data back.
Can you guys help me I'm not able to get any thing how to use cURL to send the query to remote server and getting back the result of the query.


thank in Advance.
Aug 8 '08 #1
7 5587
pbmods
5,821 Expert 4TB
Heya, Mak.

Do you need to send a query to a SQL server or to a PHP server? What database server software are you running?
Aug 8 '08 #2
mak1084
44
Heya, Mak.

Do you need to send a query to a SQL server or to a PHP server? What database server software are you running?

I want to send to a php server. and im runnig a mysql. at both side i mean on both server.
how do i use curl is main concern here. Can i use url rewriting here but how?
Aug 9 '08 #3
pbmods
5,821 Expert 4TB
Alrightey. Here's a quick tutorial that should get you started: http://blog.unitedheroes.net/curl/.
Aug 9 '08 #4
mak1084
44
Alrightey. Here's a quick tutorial that should get you started: http://blog.unitedheroes.net/curl/.

hey thanks for the link it really helped me. and now I can little understand the cURL but I still not understanding how to pass the sql query to the example.com get the result.

say my query will be

Select * from register where id = '$varible'
Aug 9 '08 #5
pbmods
5,821 Expert 4TB
hey thanks for the link it really helped me. and now I can little understand the cURL but I still not understanding how to pass the sql query to the example.com get the result.

say my query will be

Select * from register where id = '$varible'
Does it have to go through a second PHP server, or can you directly connect to the SQL server (via mysql_connect() or the like) from your script?
Aug 9 '08 #6
mak1084
44
Does it have to go through a second PHP server, or can you directly connect to the SQL server (via mysql_connect() or the like) from your script?
Hey If the request goes from the php server then i have to write script on both server. and If I use mysql_connect() then all code will be in first server it self.

but dont you think giving a user name and pass to the from remote server will be safe?
Aug 9 '08 #7
pbmods
5,821 Expert 4TB
Hey If the request goes from the php server then i have to write script on both server. and If I use mysql_connect() then all code will be in first server it self.
It seems to me like you'd have to duplicate the code on both servers anyway if you want to send inline queries. You might as well just duplicate the connection code.

but dont you think giving a user name and pass to the from remote server will be safe?
If your MySQL installation supports it, you can set the MYSQL_CLIENT_SSL flag to connect via SSL to keep your login credentials secure (http://php.net/mysql_connect).
Aug 10 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bernie | last post by:
Greetings, I have 3 servers all running SQL Server 2000 - 8.00.818. Lets call them parent, child1, and child 2. On parent, I create a view called item as follows: CREATE view Item as...
9
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
20
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the...
2
by: Danny J. Lesandrini | last post by:
Our orders database exists inside our firewall but we have a web site hosted on an ISP server. If we wanted to give users the ability to query the status of their order in real time, we could just...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
1
by: traceable1 | last post by:
I have 2 SQL databases which are the same and are giving me different query plans. select s.* from hlresults h inner join specimens s on s.specimen_tk = h.specimen_tk where s.site_tk = 9 and...
1
by: chaitanya02 | last post by:
Hi All, Well- this question might have appeared several times on this forum- but would appreciate your reply on this: I have a asp page, where customers login with some username and the pwd,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.