This topic is locked

Limit added records

3/14/2019 1:37:49 PM
PHPRunner General questions
E
epanc author

Hi, in the table "titles" I need the user to enter only 1 record (ver. Phprunner enterprise 10.0).

"titoli" table:

id_lavorat

cod_lav_re

e-mail

"Users" table:

id_us

user

password

> This code in "before record added" (of "titoli") does not work:

$ rs = CustomQuery ("select` cod_lav_re` from titoli where id_lavorat = ". $ values [" user "]);

$ Data = db_fetch_array ($ rs);

if ($ data ["` cod_lav_re` "] == 1) {

return false;

}

else {

return true;

}



I don't understand where the mistake is!

Thank you.