User Profile

Collapse

Profile Sidebar

Collapse
ScottCase
ScottCase
Last Activity: Mar 30 '08, 05:30 PM
Joined: Mar 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ScottCase
    replied to Cant get sql statement to work in mysql 5
    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
    See more | Go to post

    Leave a comment:


  • ScottCase
    started a topic Cant get sql statement to work in mysql 5

    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...
    See more | Go to post

  • ScottCase
    started a topic Cant get sql statement to work in mysql 5

    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...
    See more | Go to post
No activity results to display
Show More
Working...