I am trying to get a random value based on its type.
Examples:
-
tinyint -
rand(0, 255);
-
int -
rand(PHP_INT_MIN, PHP_INT_MAX)
How do I do that with smallint or bigint?
My guess was something like this but it gives me syntax errors and looks terrible:
rand(-2^15*(-32,768) , 2^15-1*(32,767));
Aucun commentaire:
Enregistrer un commentaire