| View previous topic :: View next topic |
| Author |
Message |
brood Voice
Joined: 01 Sep 2005 Posts: 30
|
Posted: Sun Jul 01, 2007 1:47 pm Post subject: adding dot to the count result |
|
|
To count the colums i use:
| Code: |
"SELECT count(*) from $table;"
|
Lets say the output is $cnt: 1392
Is it possible to let is show like: 1.392 (with the dot)
Same ofcourse if the count its more then a million: 1.234.323
thanks |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Jul 01, 2007 5:49 pm Post subject: |
|
|
| Code: | if {[string len $number]>3} {
for {set j [expr {[string len $number]-3}]} {$j > 0} {incr j -3} {
set number [string range $number 0 [expr {$j-1}]].[string range $number $j end]
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
brood Voice
Joined: 01 Sep 2005 Posts: 30
|
Posted: Sun Jul 01, 2007 6:14 pm Post subject: |
|
|
thanks  |
|
| Back to top |
|
 |
|