EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=596)
-   -   MySQL query to change min/maxcash (https://www.eqemulator.org/forums/showthread.php?t=17833)

cavedude 02-04-2005 05:42 AM

MySQL query to change min/maxcash
 
Does anybody know what syntax I would use to divide all the values in a given column by a certain decimal? In other words, I want to play around with coin drops and I want to reduce the values in the min and maxcash columns by X% with as few queries as possible. I've tried a few different ways so far but they either came back with a syntax error or reduced all the values to 0. Thanks for any help.

Cisyouc 02-04-2005 08:03 AM

UPDATE tablename SET columnname=columname*decimalvalue WHERE restriction=whatever;

(I think)

cavedude 02-04-2005 08:28 AM

Thanks a lot! That's perfect. I never tried 'columnname=columname*decimalvalue' although now that makes perfect sense. Without it, I would be multiplying 0 by the decimal, which would explain all those times I ended up with all 0s :)


All times are GMT -4. The time now is 11:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.