I was improving my mysql class, plan was to batch process the queries in one query so i can cut down on the load, made few functions to format the query, and the data etc, everything working great, i just pass the query from the pages, and it keeps holding insert, update and delete queries till the last min....then i found out that you cant use more then one query with php

...i.e.
Code: Select all
<?php
$query = "insert into table (f1,f2,f3) values (1,1,1);\r\n
insert into table (f1,f2,f3) values (2,2,2);";
mysql_query($query);
?>
it just wont do it, but there is some good news, my class will work fine with php5, gona have to use [php_man]mysqli_multi_query()[/php_man] for it.
anyone found a way around it? i dont mean useing a loop to do it either, thats still no help for the load

.
thanks
(i am posting it here cos i dont really need help with it, i am just shareing my experience i guess

.)