#270 (in 2.6.5) PMA_formatNumber()

closed-accepted
None
1
2005-12-04
2005-09-14
No

added new function PMA_formatNumberDown(),

like PMA_formatBytesDown(), but with /1000 than /1024
and K than KB aso.

Discussion

  • Michal Čihař

    Michal Čihař - 2005-09-14

    Logged In: YES
    user_id=192186

    What is it good for?

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    f.e. displaying high values in result tables

    but my intention was the server_status, its not really
    important if there was 13,367,277 or 13,367,577 requests at
    all so displaying 13,367K should be fine or even 13M

    it can save space in the displaying-width of tables in
    different places

     
  • Michal Čihař

    Michal Čihař - 2005-09-14
    • assigned_to: nobody --> nijel
     
  • Michal Čihař

    Michal Čihař - 2005-09-14

    Logged In: YES
    user_id=192186

    Okay if you have use for it in server_info, however I'm not
    willing to add function that is not used :-).

     
  • Sebastian Mendel

    • milestone: 284142 --> 284144
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    ok, fine, but wait, i will revise this function again ...

     
  • Sebastian Mendel

    • summary: PMA_formatNumberDown() --> PMA_formatNumber()
    • milestone: 284144 --> 284142
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    renamed to PMA_formatNumber()

    not anly formats 1000000 to 1,000 K
    also 0.0013 to 1.3
    also accepts negative vlaues

    so this can also be used to display ms values:

    echo PMA_formatNumber( $time_in_seconds, 6, 2 ) . 's';
    // 0.54 ms

    btw. PMA_formatByteDown() uses SI prefixes but should use
    Binary prefixes, as KB should be KiB because it is
    calculated with 1024

    http://en.wikipedia.org/wiki/Kilobyte

     
  • Sebastian Mendel

    • milestone: 284142 --> 284144
     
  • Sebastian Mendel

    • milestone: 284144 --> For_immediate_release
     
  • Michal Čihař

    Michal Čihař - 2005-09-19

    Logged In: YES
    user_id=192186

    Could you please reupload patch? Sourceforge tells me just:

    ArtifactFile: Invalid ArtifactFile ID

     
  • Michal Čihař

    Michal Čihař - 2005-09-19

    Logged In: YES
    user_id=192186

    It looks like bug breaking all downloads, please ignore my
    previous comment.

     
  • Michal Čihař

    Michal Čihař - 2005-09-20

    Logged In: YES
    user_id=192186

    You use there (at least) character '' it will definitely
    break within various encodings that can be used in
    phpMyAdmin, please replace special characters with
    corresponding html entities.

     
  • Sebastian Mendel

    • summary: PMA_formatNumber() --> (in 2.6.5) PMA_formatNumber()
    • assigned_to: nijel --> cybot_tm
    • priority: 5 --> 1
    • status: open --> open-accepted
     
  • Michal Čihař

    Michal Čihař - 2005-12-04
    • status: open-accepted --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks