Anyone see the problem?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crabpot8
    New Member
    • Aug 2007
    • 40

    Anyone see the problem?

    Anyone see the problem with this? Basically I am trying to get this to work, so that I can modify it to say something similar to select *, ABS(DATEDIFF ... ) from ...

    so that I can get 1) all the data and 2) the date diff in 1 query. Any help would be greatly appreciated

    crabpot
    [code=mysql]
    SELECT timestamp, ABS(DATEDIFF(NO W(),timestamp) as dateDiff FROM `rmerror` ORDER BY `timestamp` DESC LIMIT 0, 100[/code]
    Last edited by Atli; May 19 '08, 03:34 AM. Reason: Added [code] tags.
  • crabpot8
    New Member
    • Aug 2007
    • 40

    #2
    Update:

    answer was simple, I was missing a darned ')' lol
    [code=mysql]
    SELECT *, ABS(DATEDIFF(NO W(),timestamp)) as dateDiff FROM `rmerror` ORDER BY `timestamp` DESC LIMIT 0, 100[/code]
    Last edited by Atli; May 19 '08, 03:35 AM. Reason: Added [code] tags.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Glad you solved it.
      Those sort of syntax errors can be a pain :)

      Comment

      Working...