Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/01/2012, 11:36
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
problema con pdo e insert y parametro

hola tengo lo siguiente es un insert simple a una tabla .

Código PHP:

$daily 
'{"amount":0,"accumulated":0}';
$this->money 10;
                            
$insert 'INSERT INTO usuarios (idufb,nick,money,gas,phone,address,mail,daily
,ultiposi,idlevel,idavatars,city,idciud
ad, dailyrents, dailytimeto)
 VALUES (? , ? , ? , ? , ? , ? ,?, NOW(), ? , 1, 1, ? ,?,'
.$daily.','.$daily.')';

                            
$stmt_insert $this->conn->prepare$insert ); 

                            
$stmt_insert->bindParam($this->idufb);
                            
$stmt_insert->bindParam($this->nickname);
                            
$stmt_insert->bindParam($this->money);
                            
$stmt_insert->bindParam($this->gas);
                            
$stmt_insert->bindParam($this->phone);
                            
$stmt_insert->bindParam($this->address);
                            
$stmt_insert->bindParam($this->mail);
                            
$stmt_insert->bindParam($this->point);
                            
$stmt_insert->bindParam(9,  $city);
                            
$stmt_insert->bindParam(10$idcity); 
y me sale este error

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

no se que podria ser..


saludos