Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2005, 05:42 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default 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.
Reply With Quote
  #2  
Old 02-04-2005, 08:03 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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

(I think)
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 02-04-2005, 08:28 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:26 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3