In my table ,i have a field called base_pay with type int(11).
When i retrieve the base_pay of a employee and try to add or multiply the base_pay.
Here are my queries
$result = mysqli_query($con,"SELECT base_pay FROM guest where name='Mahtab'");
mysqli_query($con,"UPDATE guest SET net_pay='$result*15"
WHERE name='Mahtab'");
It says Catchable fatal error: Object of class mysqli_result could not be converted to
string
Does it mean that the return type of query is not int.
If not then how to do some mathematics on an int field retrieved from table.
Tea Addict, Oracle Java Programmer , Oracle SQL Expert , Oracle Java Web Component Developer, Oracle Web Service Developer