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;
Anil_8
0
Newbie Poster
Recommended Answers
Jump to PostOn line 6 replace
","
with a space after SET.
All 3 Replies
almostbob
866
Retired: passive income ROCKS
diafol
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.