Run SQL command on a virtual machine

Asked

Viewed 71 times

0

I have a form, which has the login and password fields.

I want to do an update sql command on a virtual machine to which of course, whoever runs the program will not have privileges to execute commands on the virtual machine.

I want to update like this for example (I know the command is not right, it’s just a simplified example):

UPDATE 'launcher' = 0 WHERE 'account' = textbox.Text and 'login' = textbox2.Text

So how can I do that? I know that the best way to do this query is by a php inside the virtual machine that I want to access the database just to give an update. Even for the safety.

In short: I want to send the login and password to the PHP program and it should run the query with the two data.

I know the code in php and the structure in C#, but I don’t know how to make this link to php by passing the variables.

  • If you want to send a command to a server, you don’t necessarily need to know that the server runs PHP, right? how is the data receiving interface of this PHP application? Web Service? REST API?

  • I’m as inquisitive as you are, but Gypsy Morrison Mendez’s comment is pertinent. I wouldn’t worry about the code where it would run not. I would worry about passing values, parameters and then yes, in each environment, execute according to the syntax of each environment. Would make a service to provide these new values and when consuming it, then yes, I would call the correct sql.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.