I have the following code:
@$import = $dbconn->prepare("UPDATE t SET");
if(a <> "")
{
$import .= "teste2= '$a', teste= '$b', ";
...
It returns this error:
Catchable fatal error: Object of class PDOStatement could not be converted to string in
The error is in the line in which I concatenate the variable the query, When I run the query in the database it works normally.