I have a host with php+mysql and i need to run a script here to register accounts to another host that has SQL Server and i also have php+mysql here also , but i need the accounts to be in SQL Server. how can i do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve had to deal with a similar issue, basically mssql inside PHP is totally fine and you have a couple of options about how to do it.
First up, there is the Microsoft php extension that will let you connect to SQL Server instances and execute queries, run procedures etc.. but with the restriction that it will only work on Windows hosts. As this was no good for me (linux hosting) I ended up not using this particular extension, but you can check it out here
If you are using linux hosting, or want to try something else on windows, you can use FreeTDS to extend your php installation with mssql functions. This also works on windows. You can read a bit more about it here – or I found the guide included with Moodle’s docs to be really useful, which you can read here.
Also don’t worry about having various database connections going at the same time – but do watch out for response times, as this can get really slow if you are using lots of remote connections over a bad line.