Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Commas Missing.

    Hello everyone,

    I have a table with a column for real estate property values. The format of
    the column is float(8,2). When the results are presented on the web page I
    get $155000.00 versus $155,000.00. How do I go about getting the comma in
    the values. I am using a MySql table.

    Thanks in advance, Braulio.


    Braulio Lumbreras Guest

  2. Similar Questions and Discussions

    1. Removing Commas From a field
      Hello I have 2 fields that are name the same in different tables. One is called : ProductGrade.GradeID and the other is Parts.GradeID. now my...
    2. Counting commas in string
      Does ColdFusion have a function that counts a certain character in a string?
    3. DataFormatString shows currency, but without commas
      Hi, How do I get the commas into my datafield if it is a currency. I am dealing with hundred thousands, so it would really help out the user if...
    4. Printing Commas in Large Number
      I have some very large numnbers EX. 1234567890. I'd like to print the number with commas. EX: 1,234,567,890. I didn't see anything builtin in printf...
    5. Convertig integers to dollars with commas and decimals
      I have some variables that are supposed to display in dollars. While the value of the variable may be an interger, such as 1290 I would like it to...
  3. #2

    Default Re: Commas Missing.

    Well, mySQL doesn't store the comma (as far as I know), so you'll need to
    add one yourself using PHP (or whatever language you're using). I suspect
    that there's a function for doing just this, but it would be very easy with
    a bit of string manipulation.


    Braulio Lumbreras wrote:
    > Hello everyone,
    >
    > I have a table with a column for real estate property values. The
    > format of the column is float(8,2). When the results are presented
    > on the web page I get $155000.00 versus $155,000.00. How do I go
    > about getting the comma in the values. I am using a MySql table.
    >
    > Thanks in advance, Braulio.

    rob::digitalburn Guest

  4. #3

    Default Re: Commas Missing.

    There's a function called currency (or with a name that contains
    "currency", like formatCurrency or something...), if you're using PHP.
    But, as was said, some string functions do it easily.

    []s

    --
    ~~ ~
    diego nunes
    web engineer
    ~ ~~


    Diego Nunes Guest

  5. #4

    Default Re: Commas Missing.

    I looked up in my PHP and MySql book and was unable to find the function.
    Does anyone know what the function is named ?

    Any help will be appreciated, Braulio.

    "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    news:cdab09$g3a$1@forums.macromedia.com...
    > There's a function called currency (or with a name that contains
    > "currency", like formatCurrency or something...), if you're using PHP.
    > But, as was said, some string functions do it easily.
    >
    > []s
    >
    > --
    > ~~ ~
    > diego nunes
    > web engineer
    > ~ ~~
    >
    >

    Braulio Lumbreras Guest

  6. #5

    Default Re: Commas Missing.

    Try searching [url]www.php.net[/url].


    Braulio Lumbreras wrote:
    > I looked up in my PHP and MySql book and was unable to find the
    > function. Does anyone know what the function is named ?
    >
    > Any help will be appreciated, Braulio.
    >
    > "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    > news:cdab09$g3a$1@forums.macromedia.com...
    >> There's a function called currency (or with a name that contains
    >> "currency", like formatCurrency or something...), if you're using
    >> PHP. But, as was said, some string functions do it easily.
    >>
    >> []s
    >>
    >> --
    >> ~~ ~
    >> diego nunes
    >> web engineer
    >> ~ ~~

    rob::digitalburn Guest

  7. #6

    Default Re: Commas Missing.

    Errr.. sorry for the wrong name, I think "currency" is a function
    from another language. Anyway, I found "money_format" that "Formats a
    number as a currency string" (its in the manual).
    I hope it helps you.

    []s

    --
    ~~ ~
    diego nunes
    web engineer
    ~ ~~


    Diego Nunes Guest

  8. #7

    Default Re: Commas Missing.

    I found the function at php.net. How do I go about addding this function to
    my web page using DreamWeaver ?
    <?php

    $number = 1234.56;

    // english notation (default)
    $english_format_number = number_format($number);
    // 1,234



    Thanks in advance, Braulio.

    "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    news:cdbigs$ma0$1@forums.macromedia.com...
    > Errr.. sorry for the wrong name, I think "currency" is a function
    > from another language. Anyway, I found "money_format" that "Formats a
    > number as a currency string" (its in the manual).
    > I hope it helps you.
    >
    > []s
    >
    > --
    > ~~ ~
    > diego nunes
    > web engineer
    > ~ ~~
    >
    >

    Braulio Lumbreras Guest

  9. #8

    Default Re: Commas Missing.

    Go to "code mode" and be happy ;)

    []s


    --
    ~~ ~
    diego nunes
    web engineer
    ~ ~~


    Diego Nunes Guest

  10. #9

    Default Re: Commas Missing.

    I get the error below on the web page when I add the code.

    Parse error: parse error in
    /home/swisherm/public_html/residentialhouseforsalelistingstest.php on line
    115

    The code is shown below.

    <td>$<?php echo
    $row_residential['Price'];english_format_number='Price'?>&nbsp; </td>

    Please advise, thanks in advance. Braulio.


    "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    news:cdc75i$ajb$1@forums.macromedia.com...
    > Go to "code mode" and be happy ;)
    >
    > []s
    >
    >
    > --
    > ~~ ~
    > diego nunes
    > web engineer
    > ~ ~~
    >
    >

    Braulio Lumbreras Guest

  11. #10

    Default Re: Commas Missing.

    Thanks Diego and Rob. I got it going.

    Thanks for your help, Braulio.

    "Braulio Lumbreras" <brauliolumbreras@websitemedia.net> wrote in message
    news:cdcm2c$m7m$1@forums.macromedia.com...
    > I get the error below on the web page when I add the code.
    >
    > Parse error: parse error in
    > /home/swisherm/public_html/residentialhouseforsalelistingstest.php on line
    > 115
    >
    > The code is shown below.
    >
    > <td>$<?php echo
    > $row_residential['Price'];english_format_number='Price'?>&nbsp; </td>
    >
    > Please advise, thanks in advance. Braulio.
    >
    >
    > "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    > news:cdc75i$ajb$1@forums.macromedia.com...
    > > Go to "code mode" and be happy ;)
    > >
    > > []s
    > >
    > >
    > > --
    > > ~~ ~
    > > diego nunes
    > > web engineer
    > > ~ ~~
    > >
    > >
    >
    >

    Braulio Lumbreras Guest

  12. #11

    Default Re: Commas Missing.

    No worries ;)

    Braulio Lumbreras wrote:
    > Thanks Diego and Rob. I got it going.
    >
    > Thanks for your help, Braulio.
    >
    > "Braulio Lumbreras" <brauliolumbreras@websitemedia.net> wrote in
    > message news:cdcm2c$m7m$1@forums.macromedia.com...
    >> I get the error below on the web page when I add the code.
    >>
    >> Parse error: parse error in
    >> /home/swisherm/public_html/residentialhouseforsalelistingstest.php
    >> on line 115
    >>
    >> The code is shown below.
    >>
    >> <td>$<?php echo
    >> $row_residential['Price'];english_format_number='Price'?>&nbsp; </td>
    >>
    >> Please advise, thanks in advance. Braulio.
    >>
    >>
    >> "Diego Nunes" <dnunes.spam.please@gmail.com> wrote in message
    >> news:cdc75i$ajb$1@forums.macromedia.com...
    >>> Go to "code mode" and be happy ;)
    >>>
    >>> []s
    >>>
    >>>
    >>> --
    >>> ~~ ~
    >>> diego nunes
    >>> web engineer
    >>> ~ ~~

    rob::digitalburn Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139