$db = new PDO($dsn, $user, $password);
$sql = file_get_contents('file.sql');
$qr = $db->exec($sql);
More Related Contents:
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `id` [closed]
- How can create Database using url or other method [duplicate]
- Problame with files on SQL
- Im trying to create some temporary tables in mysql using php
- How can I prevent SQL injection in PHP?
- SQL injection that gets around mysql_real_escape_string()
- How to include a PHP variable inside a MySQL statement
- How to apply bindValue method in LIMIT clause?
- Achieve hierarchy, Parent/Child Relationship in an effective and easy way
- selecting unique values from a column
- Import CSV file directly into MySQL
- I cannot get my login form to connect interact properly with mySQL database [closed]
- mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]
- Increment value in MySQL update query
- Create a dynamic mysql query using php variables
- How to separate DATE and TIME from DATETIME in MySQL?
- Do SQL connections opened with PDO in PHP have to be closed
- How to convert ISO8601 to Date format in php
- MySQL skipping first row
- How to reverse order output of a MySQL query
- Fatal error: Uncaught exception ‘mysqli_sql_exception’ with message ‘No index used in query/prepared statement’
- How to generate unique id in MySQL?
- Fatal error: Call to a member function query() on null
- How would I implement a simple site search with php and mySQL?
- How to check if a value already exists to avoid duplicates?
- how do I get month from date in mysql
- php/mysql zip code proximity search
- Updating column so that it contains the row position
- MYSQL select a piece of a string and order by that piece
- Aggregated query without GROUP BY