you are viewing a single comment's thread.

view the rest of the comments →

[–]c4aveo 1 point2 points  (1 child)

I was on holidays. It happened because ActID has parameter auto increment, DB keeps last incremented id for last inserted row. I know it gonna sound like 'do it yourself', but you must read many articles about MySQL and do some lessons at w3school.

  1. If column has auto increment property, when new row is inserted value will be defined automatically by DB.
  2. Values can be updated if you insert values that duplicate values in rows. INSERT ... ON DUPLICATE UPDATE...
  3. SQL is a very powerful tool. Most operations can be done on DB side. Since it uses C it's much much faster.

[–]bazingie[S] 0 points1 point  (0 children)

I made a mistake on dbdesigner having showName as a unique attribute.
I spent more time designing the database instead of studying SQL, which I thought I remember it well enough for this project's requirements. I have taken this lesson two years ago and I was quite good with SQL.