in the event "after record added" i use this code : $code = $values["code"];
$sql = "delete from nummers where code = $code";
DB::Exec( $sql ); When the variabele $code is filled with a number ( for example 12345 ) its works fine ! But when the variable $code is filled with a asci code ( for example A2345 ) its not work ! What am I doing wrong ?
Because you need to quote your data, since you also want to insert string 'A12345' not just numbers 12345: Try this: $sql = "delete from nummers where code = '$code' ";