Forums

READ DATA - RECORD NOT FOUND

atanunu 17 Jan, 2019
Please, I am trying to read data from database and I am getting results different from what I expected. I have a number (in form of price or amount) 1616383.00 and I need to ensure that this value is greater than the amount entered on the form 616383.00 or 616383.

However, I keep getting a record not found message. Kindly help






healyhatman 17 Jan, 2019
Why make two data reads? Why not just use the first data read, and using PHP check for

$this->data("field_name_on_form") > $this->get("read_data112.Online.currentbalance")

Surely that'd be better? That way you know that the account exists AND if it has enough money.

Also: what's the data type of the database field? Is it VARCHAR? Because if it is that's basically a String and you can't use > to compare it to a number without casting it first.
atanunu 17 Jan, 2019
Thanks for your response!!!

I am currently using VARCHAR, what can I use to be able to compare numbers?
healyhatman 17 Jan, 2019
Decimal, or just use the PHP block like I said
This topic is locked and no more replies can be posted.