Hello
What i am doing is getting the top 10 referrers.
the html table has the following fields
name jvreferals regularreferals totalreferals
i need the sql to add the jvreferals and regular referals together and then display the top 10 sorted by the total of jvreferals+regu larreferals
scott
User Profile
Collapse
-
Cant get sql statement to work in mysql 5
Hello,
I have this sql statement and it works fine with mysql v4
[CODE=mysql]$query = "SELECT id, name, jv_signups, mem_signups, (
SELECT SUM( jv_signups )
) + (
SELECT SUM( mem_signups ) ) AS total
FROM members
WHERE clicktracking >0
AND LEVEL =2
ORDER BY total DESC
LIMIT 0 , 10";[/CODE]
but on mysql v5 i get the following... -
Cant get sql statement to work in mysql 5
Hello,
I have this sql statement and it works fine with mysql v4
$query = "SELECT id, name, jv_signups, mem_signups, (
SELECT SUM( jv_signups )
) + (
SELECT SUM( mem_signups ) ) AS total
FROM members
WHERE clicktracking >0
AND LEVEL =2
ORDER BY total DESC
LIMIT 0 , 10";
but on mysql v5 i get the following error:
DATABASE...
No activity results to display
Show More
Leave a comment: