Gossamer Forum
Home : Products : DBMan SQL : Discussion :

comma between digits

Quote Reply
comma between digits
Seasons Greetings
got a quick question:
when doing a simple record count, what code is required to include a comma between every 3, 6 or 9th whole number?
ie 1,000

code below: thanks Rob

$query = qq!

SELECT count(*)
FROM $db_table
!;

$sth = $dbh->prepare ($query) or &cgierr("Unable to query database. Reason: $DBI::errstr. Query: $query");
$sth->execute or &cgierr("Unable to query database. Reason: $DBI::errstr. Query: $query");
($count) = $sth->fetchrow_array();
Subject Author Views Date
Thread comma between digits robert1234 2001 Dec 29, 2001, 8:33 AM
Post Re: [robert1234] comma between digits
Paul 1942 Dec 29, 2001, 8:46 AM