SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Update query

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Location
    doberman
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Update query

    Ok, This shouldn't be too hard but its still beating me...
    The thing that's killing me here is that the time I'm trying to update is was, forwhatever reason, defined as varchar ('HH:MM:SS'). I need to add minutes to a stored time... Here's what I have...


    Code:
    UPDATE tasks SET 
    alarm_time = DATE_ADD( 'alarm_time',  INTERVAL '00:05:00' HOUR_SECOND  )  WHERE task_id =729
    The only thing this does is empty the field. What gives?

    What am I doing wrong? Is there a better way?
    Got logical business solutions? Get SuM!
    Greg Starr (SuM)
    LogicStation.net
    Florida Based Contract Web Developer

  2. #2
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •