Opened 14 years ago
Closed 14 years ago
#18407 closed defect (bug) (fixed)
WPDB Prepare(), update(), insert() refer to %d as a decimal
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Inline Docs | Keywords: | has-patch |
Focuses: | Cc: |
Description
%d is refered to as a decimal in the inline docs for functions which use prepare().
%d is also refered to as a decimal in the PHP docs as well, however, %d represents the input as a Integer, not a Decimal, resulting in the loss of the fraction part of the number.
Mentioned by 24/7 on wp-hackers
Attachments (3)
Change History (9)
#2
@
14 years ago
In return, we should probably add %f. I think there's another ticket for that.
Sounds good to me, But I don't recall seeing, and can't find, another ticket referencing that.
#5
@
14 years ago
- Cc daryl@… added
- Keywords has-patch added; needs-patch removed
I've attached three files. One is a little plugin that makes it easy to test insertion of floats using the %f specifier. Another is graphic display of some values I tested (positive, negative, alphabetical, 0, and incorrect precision). The last is a patch that would update the phpdoc in wp-db.php should my testing prove of value.
In return, we should probably add %f. I think there's another ticket for that.