Calculating percentages from database
I have a MySQL database with a table that has a field/column labled "user8" (which is the field for users' state).
I have this PHP call and its working fine if I call all states individually and I only want numbers of rows.
Code (text):
<?PHP
mysql_select_db("my_database") or die(mysql_error());
$result = mysql_query("SELECT *
FROM `users`
WHERE `user8` LIKE ‘%Georgia%’
");
$num_rows = mysql_num_rows($result);
echo $num_rows – Georgia\n;
?>
I would like the MySQL call and the PHP to echo…
Calculating percentages from database
See original post by ourloop
Leave a Reply
You must be logged in to post a comment.