Hello,
in the "front list" in the "Columns list" is "fun.funies: FUNies".
How do I change this code if the code in the "Fields-Box" is intended to:
Best wishes
Fred.
in the "front list" in the "Columns list" is "fun.funies: FUNies".
How do I change this code if the code in the "Fields-Box" is intended to:
fun.funies:
<?php
$query = "SELECT user_id, SUM(funies) FROM c9ol5_funies GROUP BY user_id";
$result = mysql_query($query) or die(mysql_error());
// Print out result
while($row = mysql_fetch_array($result)){
echo " ". $row['user_id']. " = ". $row['SUM(funies)'];
echo "<br />";
}
?>
Best wishes
Fred.
Hi Fred,
Sorry but I have no idea what you are trying to do here?
I'm pretty sure that you don't want to run a database query like this for each row in the listing.
You also don't want to use $row as a variable name as CC also uses that.
Bob
Sorry but I have no idea what you are trying to do here?
I'm pretty sure that you don't want to run a database query like this for each row in the listing.
You also don't want to use $row as a variable name as CC also uses that.
Bob
Hi,
My problem is only:
I have in the "Fields box" in "Models":
The sum is displayed in the frontend me correctly but the other rows in the table are suddenly empty.
What is the problem?
Best wishes
Fred.
My problem is only:
I have in the "Fields box" in "Models":
<?php return array("SUM(funies)" => "fun.funies"); ?>
The sum is displayed in the frontend me correctly but the other rows in the table are suddenly empty.
What is the problem?
Best wishes
Fred.
Hi Fredolino,
That looks correct, your Fields list only specifies one field so that is all that is being retrieved.
Bob
That looks correct, your Fields list only specifies one field so that is all that is being retrieved.
Bob
This topic is locked and no more replies can be posted.