Skip to main content
edited title
Link
András Váczi
  • 31.6k
  • 13
  • 101
  • 149

MySQL on insert in table update field in another table? [SOLVED]

added 98 characters in body; edited title
Source Link

MySQL on insert in table update field in another table? [SOLVED]

SOLVED!

I used :

UPDATE Topics SET Answers = Answers + 1 WHERE ID = NEW.TopicID;

MySQL on insert in table update field in another table?

MySQL on insert in table update field in another table? [SOLVED]

SOLVED!

I used :

UPDATE Topics SET Answers = Answers + 1 WHERE ID = NEW.TopicID;
added 241 characters in body
Source Link

New Problem: How I can implement this query:

UPDATE Topics SET Answers = Answers + 1 WHERE ID = TopicID;

instead of:

UPDATE Topics SET Answers = Answers + 1

Where TopicID must be TopicID of just inserted row?

New Problem: How I can implement this query:

UPDATE Topics SET Answers = Answers + 1 WHERE ID = TopicID;

instead of:

UPDATE Topics SET Answers = Answers + 1

Where TopicID must be TopicID of just inserted row?

added 3394 characters in body
Source Link
Loading
Source Link
Loading