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
Post a Comment