How do i add a number to the result of a query

Discussion in 'PHP' started by tyankee, Jan 28, 2014.

  1. #1
    i want to add 25 to the result of this query:

    $resultm = mysql_query("SELECT *,SUM(point.point_value) AS month_total FROM point_tracking LEFT JOIN point ON point_tracking.point_id=point.point_id WHERE point_tracking.member_id='".$_SESSION['id']."' AND entry_date LIKE '".date('Y-m')."%'");


    how do i do that?
     
    tyankee, Jan 28, 2014 IP
  2. FWH1

    FWH1 Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I'm pretty sure you can just add to things with the plus sign like SELECT x+5 FROM y.
     
    FWH1, Feb 2, 2014 IP
  3. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #3
    That or you would have to show us the entire code, where the results are being fetched.
     
    ThePHPMaster, Feb 2, 2014 IP