- Parameter(s):
- $col_name: column name
- $prefix: currency prefix. The default is USD symbol, $
- $suffix: currency suffix. The default is blank.
- $thousandsSeparator: The character as the thousands separator. The default is the comma character “,”.
- $decimalSeparator: The character as the decimal separator. The default is the dot character.
- $decimalPlaces: The number of digital is displayed after the decimal point. The default is two.
- $defaultValue: The value display when the value return from database is null or empty string. The default is 0.00
- Description:
- This is helper method to display currency value. It formats column as currency when displayed. The value is automatically unformatted during CRUD operations.
- Example:
1 | $dg -> set_col_currency("price", "EUR", "", ",", 2, "0.00"); |