I have a program for students in my school uses asp with mssql database with a small server in the school, and I want to make a website with php and mysql database, can I always update the queries by exporting the mssql to mysql? and how I can do this.
And if you had any other suggestion.

You cannot update queries. You could update a database. This is a question of workflow. How do data get from the school database to your home computer? Is there a direct network connection which you might use for updating? Or would you export from mssql to an intermediate format and then import into mysql? And would you have to re-update the school database with your changes from your home installation?

The school database computer is connected to the internet but not like a web server, just as any pc. But I will make a website,and the teachers want to put data in one database(mssql) which is the school database, and with one click can update the website database(mysql).The program in the school is on(asp and mssql), and I know(php with mysql), this is the problem.

If you know php/mysql, you could learn php/mssql and then write a php script which transfers the school data to your website.
Or find out how mssql data can be exported (presumably as CSV) and write a shell script which imports them into you database.
Do this is serveral small steps.
Export from mssql to CSV.
Import from CSV into mysql.
Write s shell script which does the job.
Write a shell script which transfers the mssql data to you web server (for example with ftp).
Write a shell script which combines all.

I have the csv file on the computer with internet connection, and with one click, the online database of the website should be updated automatically.