Possible Duplicate:
php validate integer
Currently I'm using this method:
- Validate the input using 
isset($val) && is_numeric($val) - Cast it to 
intand passing it to the function:DoSomething((int)$val); 
So my question is this: Is this the fastest and most practical way to do this? If I cast the value to int, is the int range enough for the maximum number of rows in the mysql database?