SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Select Not null data

    I have a SQL command.....

    SELECT info_events
    FROM bulletin
    WHERE date = {fn CURDATE()}
    ORDER BY 'time' DESC


    I only need the NOT NULL info from the column so where would I add that function?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    SELECT info_events
    FROM bulletin
    WHERE date = {fn CURDATE()}
      AND info_events IS NOT NULL
    ORDER BY `time` DESC
    Careful with those single quotes around the word "time", unless you meant to order by a literal.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you dan, you've helped me a lot recently. Everything seems to be working great in my project. I may need you again though, haha


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •