$rater = 'SELECT rating_sum FROM #__content_rating WHERE content_id=743';
in the table content_rating and on the content_id 743 the rating sum is 4
so why does
echo $rater; // propduce nothing???
I would greatly appreciate any help, thanks.
MYSQL query, is this possible?
Moderator: General Moderators
-
scrambleded
- Forum Newbie
- Posts: 1
- Joined: Tue Jul 22, 2008 6:34 pm
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: MYSQL query, is this possible?
http://us.php.net/manual/en/function.my ... -array.php
Check out the examples.
Check out the examples.
Re: MYSQL query, is this possible?
What is the purpose of the #_ ?scrambleded wrote:$rater = 'SELECT rating_sum FROM #__content_rating WHERE content_id=743';
in the table content_rating and on the content_id 743 the rating sum is 4
so why does
echo $rater; // propduce nothing???
I would greatly appreciate any help, thanks.
Re: MYSQL query, is this possible?
try these:
Code: Select all
$rater = 'SELECT rating_sum FROM #__content_rating WHERE content_id=743';
$result=mysql_query($rater);
while ($row = msql_fetch_array($result))
{
$rs[]=$row['rating_sum'];
}
print_r($rs);