Skip to content

Instantly share code, notes, and snippets.

@bryanveloso
Created August 31, 2008 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanveloso/8158 to your computer and use it in GitHub Desktop.
Save bryanveloso/8158 to your computer and use it in GitHub Desktop.
Selects the number of cash points or kafra points an account has.
SELECT SUM(CAST(`value`/100 AS DECIMAL(7,2))) FROM `global_reg_value` WHERE (`str` LIKE '#CASHPOINTS' || `str` LIKE '#KAFRAPOINTS') AND `type` = '2' AND `account_id` = 'THEIR_ACCOUNT_ID';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment