perchè random restituisce un float!!!! http://dev.mysql.com/doc/refman/5.0/...#function_rand

quindi avoja te a cercare un id che è intero con un valore float!!! Dal manuale:

To obtain a random integer R in the range i <= R < j, use the expression FLOOR(i + RAND() * (j – i)). For example, to obtain a random integer in the range the range 7 <= R < 12, you could use the following statement:

SELECT FLOOR(7 + (RAND() * 5));