Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integer auto_increment Primary key not showing up

 
Kyupa Supa
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
......................


It doesn't search by ID

is is StudentsManager.java:



The list -students is keeping the students from DB (it works, I used it in other place too)


...............................
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly are you expecting to happen?

Why have you made no provision for null values for the "year" and "id" parameters?

Bill
 
Kyupa Supa
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:What exactly are you expecting to happen?

Why have you made no provision for null values for the "year" and "id" parameters?

Bill


I wanted to display all students with the same id, but I realized I should not make it auto increment, because I need some of the IDs to be common, for linking the table with another. I wanted to search a student by "ID", "name" or "year". I testes with JavaScript in the previous page that user entered one of the 3 elements. But I'll leave the ID aside now, so that user searches only by "year" or "name".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic