Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make one autoincrement mySQL's table column invisible  RSS feed

 
Jonas Kazlauskas
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there! I need your advice, coders! Please help!
The problem is that I populate the table with autoincrement primary key. I don't want it to be visible. I have been googling for hours to find no solution. It seems that sql/mysql provides no solution by selecting all table columns except one. So I wonder, how I could overcome this problem. Here is some of my code:

The ID is used in
I tried to omit ID from my SELECT statement, I tried to put Date as a first element in data[iEil][0] but neither options were successful. Data hasn't been changed in database. NOW, everything works fine, except I don't want ID column to be visible in my table. Any ideas?
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want ID column to be visible in my table


Remove the column from the view of the table.



The Id will still be contained in the TableModel.
 
Jonas Kazlauskas
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. This has solved my problem:
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!