frost Posted November 29, 2007 Share Posted November 29, 2007 Hi, I have a script that runs multiple queries that update, insert and delete records from a database. They look something like this $result=MYSQL_QUERY("INSERT blah blah $result=MYSQL_QUERY("delete blah blah $result=MYSQL_QUERY("UPDATE blah blah I am just wondering if this is the best way to do this? Is there a faster method? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/ Share on other sites More sharing options...
fenway Posted November 29, 2007 Share Posted November 29, 2007 As opposed to? Quote Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/#findComment-402154 Share on other sites More sharing options...
frost Posted November 29, 2007 Author Share Posted November 29, 2007 thats my question, is there a way to combine them or something? or is my method as good as any? Quote Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/#findComment-402183 Share on other sites More sharing options...
trq Posted November 29, 2007 Share Posted November 29, 2007 Not throught php. MySql itself can hadnle multiple queries seperated by ;, but php's mysql* extensions have this disabled for security reasons I believe. Quote Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/#findComment-402203 Share on other sites More sharing options...
fenway Posted November 29, 2007 Share Posted November 29, 2007 There's no difference... you still have to issue one query at a time to the server, if a function does the magic for you. Your method is fine. Quote Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/#findComment-402269 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.