Hi,
I'm trying to join a query from my database(MySQL)
But I got 2 problems
Here is the query:
$get = mysql_query("SELECT
title, id, to, SUM(value)
FROM userinfo, listinfo");
If I add "GROUP BY id" at the end of the query, the script works...
Problem 1:
What field shoud I GROUP BY?
Problem 2:
I don't need the SUM from alle the "value" fields... only the SUM where id = to
'title' and 'id' are fields from userinfo
'to' and 'value' are from listinfo
So I need the 'title', 'id', 'to' and the sum og the 'value' where to = id
😕 😕 😕 😕