0

I tried this function does not work me.

$clv = Execute("SELECT `id_propiedades` FROM `propiedades` WHERE `gestor`=2 ORDER BY `propiedades`.`id_propiedades` ASC"); $estado = "1"; foreach (array($clv) as $valor) { $row_data[] = "('$valor','$estado')"; } $sInsertSql3 = " INSERT INTO `cuotas` (`clv_cuota` ,`estado`) VALUES".implode(',', $row_data); $GLOBALS["conn"]->Execute($sInsertSql3); 

I get this error: Catchable fatal error: Object of class mysqlt_driver_ResultSet could not be converted to string in ...

any suggestions

1
  • Which line does the error refer to in your code? Commented Dec 21, 2014 at 21:51

1 Answer 1

2

I would try the single query:

'INSERT INTO cuotas (cuotas.clv_cuoata, cuotas.estado) SELECT propiedades.id_propiedades, 1 FROM propiedades WHERE gestor=2 ORDER BY propriedades.id_propiedades ASC' 
Sign up to request clarification or add additional context in comments.

Comments