SELECT POW( 5, 2 )
Output of this is
25
For negative
select pow( 4,-2);
Output is
0.065
require 'config.php'; // Database connection
for($i=1; $i<=10; $i++){
$sql=$dbo->prepare("insert into sql_pow(a,b) values($i,pow($i,2))");
if($sql->execute()){
echo " $i <br> ";
}
else{
echo " Not able to add data ";
}
}