I have a problem with the count of the rows after a query.
I work with a DB MS Access and I know that odbc_num_rows doesn't work.
I thied this:
$sql1 = "SELECT COUNT(*) FROM contribuente where con_numero_controllo in (".$sql.") as righe";
$sql_result = odbc_prepare($cn,$sql1) or die("ERROR");
odbc_execute($sql_result) or die("ERROR");
$rc = odbc_fetch_into($sql_result, $my_array);
echo ("Total rows: " . $my_array);
the subselect $sql is:
$sql="select con_numero_controllo as N_controllo,con_numero_registro as N_registro, con_cognome as Cognome, con_nome as Nome,con_data_nascita as Data_nascita
where (1=1) and (con_cognome like'ca%')";
con_cognome is a choice that the uses makes. for example i write "ca" and it gives me back the all name that gegin with ca.
there is something wrong in the the subselect bacause it can't perform it.
Can anyone help me please..
thanks in advance