I'm facing an issue with extracting values from a SQL table, specifically the price column which is stored as decimal. Currently, I have the following code:
int currentID = cursor.getInt(idColumnIndex);
String currentProduct = cursor.getString(productColumnIndex);
int currentPrice = cursor.getInt(priceColumnIndex);
int currentQuantity = cursor.getInt(quantityColumnIndex);
String currentSupplier = cursor.getString(supplierColumnIndex);
int currentPhone = cursor.getInt(phoneColumnIndex);
As you can see, the currentPrice variable is set as integer, but in the SQL table it is stored as decimal. Can anyone guide me on how to correctly extract this decimal value?