Skip navigation
Currently Being Moderated

How to INSERT INTO a specific row?

Jan 23, 2014 9:57 AM

I have a form with a calendar at the top, below it is a list of items each with a check box.

Here is a wonderful visual of it -



Checkbox | Col | Col | Col

Checkbox | Col | Col | Col

Checkbox | Col | Col | Col


I want it so you select the date and it gets passed into the database in the same row as the one (definitely one, multiple is better) that has been checked by the user.


I was trying an INSERT INTO with a WHERE statement but apparently you can't do that. So if I can use a WHERE with INSERT INTO, how can I identify which row to insert the info?


Currently it is passing the dates but it creates a new row.


I didn't think posting the code is neccisary for this question but if anyone wants to see it let me know and I will post it.



  • Currently Being Moderated
    Jan 23, 2014 10:58 AM   in reply to gwarmonger

    An INSERT operation will *always* do just that, insert rows into a table.  Is sounds like maybe you should be doing an UPDATE operation instead.  Can you give a bit more explanation on the database table design and what each row in the table represents?  Maybe walk through the user interaction more too?  And including relevant code is usually helpful.


    -Carl V.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points