ok first off the reason why its return 1,1,1
if i was to do this
$my_array = count(array("one","two","three));
print $my_array;// this would return 3
now imagine this was the return of a mysql query
basically what your doing is counting the result of the count
ie count(3); // returns 1
its kinda hard to exlpain needless to say
$query = mysql_query("SELECT COUNT(*) FROM ".$prefix."testimonials");
is returning the already counted fields
so, i use my own class for database functions ive actually forgotten the php defined functions but
assuming the return is
3,4,6
print "$query[0] $query[1] $query[2]";
[edit]
as i said i dont rember the actuall php mysql functions cause i use a class to handle that
but you may have to use mysql_result() or somthing becase just printing $query[1] would give you a result id
i think it may be something like
print mysql_result($query[1]);
www.php.net/mysql
Examples
Example 1. mysql_result() example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$result = mysql_query('SELECT name FROM work.employee');
if (!$result) {
die('Could not query:' . mysql_error());
}
echo mysql_result($result, 2); // outputs third employee's name
mysql_close($link);
?>
$query = mysql_query("SELECT COUNT(*) FROM ".$prefix."testimonials"); // 6,6,6
$total = mysql_num_rows($query); //1,1,1