Get the Values of rsnew

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mpol_ch
User
Posts: 877
Location: Switzerland

Get the Values of rsnew

Post by mpol_ch »

Hello
I am trying to get the value of $rsnew["zahlen"]. The Content is: 12,2,3,5,17
I am getting only "12" insterted into table. This means just the first value. Do you have a suggestion what should do here?

function Row_Inserted($rsold, &$rsnew) {
$arr=array($rsnew["Zahlen"]);
$cnt = count($arr);
for ($i = 0; $i < $cnt; $i++) {
$myArr = "'$arr[$i]'";
$MyResult = ew_Execute("INSERT INTO test(Zahl) VALUES($myArr)");
}
}

Thanks
mpol_ch


mpol_ch
User
Posts: 877
Location: Switzerland

Post by mpol_ch »

Hello

Just solved my peoblem with the following code. Thanks.

function Row_Inserted($rsold, &$rsnew) {
$arr= explode(",",$rsnew["Zahlen"]);
$cnt = count($arr);
for ($i = 0; $i < $cnt; $i++) {
$myArr = "'$arr[$i]'";
$MyResult = ew_Execute("INSERT INTO test(Zahl) VALUES($myArr)");
}
}

thanks
mpol_ch


Post Reply