Executing multiple update statements in PHP
- by theband
I have three update statements to be executed in PHP, i am getting the values of all these as return parameters. How to execute each statement independely and finally show the end user the result that it has been successfully updated.
<?php
public function name($parameter1,$parameter2.... $parametern) {
$records=array();
$sql="";
$sql2="";
$sql3="";
$result=mysql_query($sql);
//return $result;
if(!$result){throw new Exception(mysql_error());}
if(mysql_num_rows($result)==0){return $records;}
while($row=mysql_fetch_assoc($result)){$records[]=$row;}
return $records;
}
?>
Then how finally we can get the result in my row object.