ToonMariner Posted January 15, 2007 Share Posted January 15, 2007 Hi people - I could do with some input on this please.I have query heavy app and wondered if it would be possible to store all the query strings into a file and then simply use that file as teh query (just like importing in phpmyadmin - but with updates and inserts etc etc.)1. Will it only count as one query?2. Is it feasible - if so how can I achieve it.Thanks people... Link to comment https://forums.phpfreaks.com/topic/34183-bulk-query-help/ Share on other sites More sharing options...
btherl Posted January 15, 2007 Share Posted January 15, 2007 Multiple queries never count as one query in mysql, when using MyISAM tables. So the main risk of the approach you're suggesting is that if one query fails for whatever reason, recovery can be difficult.This approach would be fine for a situation where you can recover by simply dropping a table used for importing, for example.As for achieving it, I'm sketchy on the details, but you should be able to use the mysql command line client something like this:[code=php:0]mysql database < commands.sql[/code] Link to comment https://forums.phpfreaks.com/topic/34183-bulk-query-help/#findComment-160885 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.