thank you WebProgrammerGoddess but I ,finnaly found out what the mistake is!
it is the odbc_num_rows that didn't work because there is a problem with many odbc drivers so I now need a way to find out how to do this function another way but I think I'll be able to do so without much trouble...