Hi, Is there any possible to multiple update in the single query similiar to insert query. ex: insert into table (fields) values(value1,value2,etc). This query is really time saving compared to one by one insert. Since i am going to do it for around 15,000 records. I need similiar query to the update as well. Is it possible ??? say for example; update table set (fieldnames ) values(value1,value2,etc).
foreach($_POST['join'] as $key => $val) { $keysAry[] = $key; $valsAry[] = "'".$val."'"; } $keysAry[] = 'uploadfile'; $valsAry[] = "'".$filename."'"; $keysAry[] = 'regdate'; $valsAry[] = "'".date('Y-m-d')."'"; $keysAry[] = 'status'; $valsAry[] = '1'; $keys = implode("," ,$keysAry); $vals = implode("," , $valsAry); $qry = "insert into joinsus_details (".$keys.") values (".$vals.")"; $sql = mysql_query($qry); in this program names are complsary database name u matain like name="araauname[databasename]"
Hi , I need it for the update query and not for the insert . And am trying to concat all the update query into a variable using the semicolon and update it with the help of foreach. It is working .But my concern is speed, and time taken .