Chris S
Retired
- Messages
- 2,055
- Reaction score
- 1
- Points
- 38
I have this query
and i am getting resource ID #21
basically i want the number of views for the photo albums but when i run that i get the error
but when i put that into phpmyadmin it works. anybody know whats wrong
PHP:
<?php
$album_views = mysql_query("SELECT SUM(views) FROM `photo_albums`") or die(mysql_error());
?>
There have been <?php echo $album_views; ?> total album views.
and i am getting resource ID #21
basically i want the number of views for the photo albums but when i run that i get the error
but when i put that into phpmyadmin it works. anybody know whats wrong