HughbertD Posted January 24, 2008 Share Posted January 24, 2008 I have a file I have created with a bunch of regular expressions to create a load of sql insert statements, how can I execute this from PHP? Thanks for any help I had been trying to do this using DBD:Mysql in Perl but I can't get the damn thing installed! If anyone knows the specifics of how to do that, that would be great too! Regards Hugh Link to comment https://forums.phpfreaks.com/topic/87544-executing-mysql-external-files-from-php/ Share on other sites More sharing options...
jaymc Posted January 24, 2008 Share Posted January 24, 2008 put them in an array called $whatever then do foreach ($whatever as $whatever) { mysql_query($whatever); } Link to comment https://forums.phpfreaks.com/topic/87544-executing-mysql-external-files-from-php/#findComment-447751 Share on other sites More sharing options...
trq Posted January 24, 2008 Share Posted January 24, 2008 Your first question: What do regular expressions have to do with sql statements? Your second question: Nothing to do with php. Link to comment https://forums.phpfreaks.com/topic/87544-executing-mysql-external-files-from-php/#findComment-447754 Share on other sites More sharing options...
HughbertD Posted January 24, 2008 Author Share Posted January 24, 2008 The regular expressions; I was just saying that was how I got my file with sql statements in. I mentioned it to demonstrate the file needs to be read in by PHP from an external source. The second question was definitely a naughty by me (sorry) just in case someone had had the same problem as me and knew any solutions. Link to comment https://forums.phpfreaks.com/topic/87544-executing-mysql-external-files-from-php/#findComment-447758 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.