To use modular exponentiation as you would require when using the Fermat Primality Test with large numbers (100,000+), it calls for some very large calculations.
Whe
use this
$num1 = "123456789012345678901234567890"; $num2 = "9876543210"; $r = mysql_query("Select @sum:=$num1 + $num2"); $sumR = mysql_fetch_row($r); $sum = $sumR[0];