Executing multiple update statements in PHP

Posted by theband on Stack Overflow See other posts from Stack Overflow or by theband
Published on 2010-04-04T20:16:05Z Indexed on 2010/04/04 20:23 UTC
Read the original article Hit count: 122

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql