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... Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.