1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

GOT error #1064

Discussion in 'MySQL' started by Muhammad Jamshaid, Feb 28, 2013.

  1. #1
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where Job_id='33' and Sk_id='2'' at line 1

    my query is
    insert into tbl_jobskill(Sk_id,Job_id)values('1','33') ON DUPLICATE KEY UPDATE Sk_id='1',Job_id='33' where Job_id='33' and Sk_id='2'
     
    Muhammad Jamshaid, Feb 28, 2013 IP
  2. Forbidd3n

    Forbidd3n Well-Known Member

    Messages:
    262
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #2
    You don't use where on the ON DUPLICATE KEY update. It will update based on the duplicate key already.
    Remove this an it will work.

    Thanks,
    Forb.
     
    Forbidd3n, Mar 5, 2013 IP