I want commas in my numbers like 1234 = 1,234 123456 1,234,56 etc
This is the code....
<?php
//Get current count
$result = mysql_query("SELECT counter FROM profiles WHERE username='$username'") or
die("Unable to query database ! " . mysql_error());
//Add 1 to the count
$count = mysql_result($result, 0);
$count++;
//Update database with new value
mysql_query("UPDATE profiles SET counter = '$count' WHERE username='$username'") or
die("Unable to insert into database ! " . mysql_error());
?>
Any ideas?
When you display the number, you want to use:
number_format($count);