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. 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? 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? 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. 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. Link to comment https://forums.phpfreaks.com/topic/79432-solved-multiple-queries-quickly/#findComment-402269 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.