PHP/MySQLi recordset search not working with decimal amounts?
I have a decimal field in my database for storing currency values. I have a drop-down select form which searches this field (Ticket Price) depending on the value selected by the user:
http://www.dreamcargalaxy.com/car-competition.php
This drop down is populated by results from the table, grouped by value, however when you select any of the decimal values - £3.50 or £4.50 - the search isn't working.
In the database table the values are stored as 3.5 and 4.5.
I tried changing the option value from
<option value="<?php echo($rsTICKETS->getColumnVal("dreamcarTICKETPRICE")); ?>">
to...
<option value="<?php echo number_format($rsTICKETS->getColumnVal("dreamcarTICKETPRICE"),2); ?>">
....to try to force the decimal value, but that hasn't changed it. What am I doing wrong?
Thank you.
NJ