Hi,
I need to count the duplicated specific fields ina table, in this case the client id because I need to assign the next id number to a new client insertion.
example
table (asuntos)
id - int(11)
id_cliente int(11)
id_cons_cli int(11)
I need to count how many times id_cliente is in (asuntos) table, after this I need to update the field
id_cons_cli with the count + 1
I try with the next code…
$res_sql = ‘SELECT COUNT(id_cliente) FROM asuntos’;
{id_cons_cli} = $res_sql + 1;
I use in Ajax event when OnChange, but when run the field id_cons_cli appears 1, and in the table exist 9 registers with the same client (id_cliente)
Thanks in advance
Eduardo C?zares