I'm trying this function to insert data into another table taking the values of another.
// Row Inserted event
function Row_Inserted($rsold, &$rsnew) {
$clv = ew_ExecuteScalar("SELECT id_propiedades
FROM propiedades
WHERE gestor
=2 ORDER BY propiedades
.id_propiedades
ASC");
$estado = ($rsnew["estado"] <> "") ? $rsnew["estado"] : "1";
$cuenta = ($rsnew["cuenta"] <> "") ? $rsnew["cuenta"] : "";
$sInsertSql3 = " INSERT INTO cuotas
(clv_cuota
,estado
,cuenta
) VALUES ('$clv','$estado','$cuenta')";
$GLOBALS["conn"]->Execute($sInsertSql3);
}
works correctly but I just insert the first value, not all those in $clv
Is there anything that is not doing well?