Execute SQL file via php

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Execute SQL file via php

Post by Pyrite »

From a php script, how do I execute an multi-line/command SQL file?

Normally I just use phpMyAdmin to import sql files, but in this case I need to do it in my own script.

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There are snips available in raghavan20's threads found in Regex.
Post Reply