php - Mysql query on SQL file -


how can use mysql querys on sql file on custom path? file contain db or table.

for example this:

// file contain db $mysqli = new mysqli('../myfolder/mydb.sql', 'user', 'pass'); $mysqli -> query("select * table");  // file contain table  $mysqli = new mysqli('../myfolder/mytable.sql', 'user', 'pass'); $mysqli -> query("select * table"); 

the .sql file contains sql commands; need run create database, , can use mysqli connect database.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -