How to attach .sql file to my php application

I have a php application code and a *.sql file which was running in windows application.
I am trying to run this in my ubuntu pc. I installed xamp in ubuntu and successfully ran the php code. But the code is not running when I move to page which access the database.
How do I attach .sql file to my php code in ubuntu?
I am new to php and well as sql.