Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Dynamic Text Field/MYSQL

  1. #11
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    how do i stop it from truncating?

  2. #12
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    Dear Smitty: I've been up all night and need to get some sleep now. Have you defined a datatype for the price variable? I'm just learning php so this is a bit beyond me. There are some great people on DD who know infinitely more than I. But I'd look at this and see exactly what it is doing. Good luck! Sorry I can't be of more help.


    Code:
    KT_escapeAttribute($row_rsmenu_items['price']);

  3. #13
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Still need some help if anyone knows anything?

  4. #14
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I believe your query asks us a very important question.
    what type is best for price?
    Our first instinct might go for a number, but price is in the form XX.XX, so we can not just use any number form, we need it to support decimal places, for `float', `double', `real' and `decimal' we can specify the size and number of decimal places that we want to be able to use so I would suggest one of these is used and due to the limitations of `float' and `double/real' I would suggest using `decimal/numeric' to show our prices, although this field type does actually store the values as a string I believe it is the best for our needs.

    I hope this answers your question... Let me know... I experienced this on a recent project i am doing and it very well fulfill my need.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •