0
 I am new in php and i am facing a problem in mysqli query Parse error: syntax error, unexpected ',' in php
can anyone help me if you know?



$query=("update company SET","(freeze_reason='.$pid.',freeze_status=1 where cid=:id"),array('id'=>$cid));
                return self::query($query,$str,$params);


 public static function query($query,$param_string="",$param_array=array()){//used in void type query like insert,delete,update
        $stmt=self::$mysqli->prepare($query);
        array_unshift($param_array,$param_string);
        if(count($param_array)>1)
            call_user_func_array(array($stmt,'bind_param'),$param_array);
        $stmt->execute();
        $ans=max(self::$mysqli->affected_rows,self::$mysqli->insert_id);
        $stmt->close();
        return $ans;
4
Contributors
3
Replies
14
Views
2 Years
Discussion Span
Last Post by pritaeas
0

what is the complete error message, what you have provided has been edited: useless

Edited by almostbob

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.