I am just trying to do somthing in Java. I wrote a small programm in Java using JDBC connecting with MySql. I am using Netbeans 6.9
Here is my database structure -
Field Type Null Default Description
pnr_no int(7) No PNR No.
t_no int(4) Yes NULL Train No.
t_name varchar(30) Yes NULL Train Name
s_frm varchar(30) Yes NULL Station From
s_to varchar(30) Yes NULL Station To
j_date date Yes NULL Journey Date
class varchar(10) Yes NULL Class
p1name varchar(30) Yes NULL Passenger 1 Name
p1age tinyint(2) Yes NULL Passenger 1 Age
p1sex char(1) Yes NULL Passenger 1 Sex
p1sc varchar(3) Yes NULL Passenger 1 Senior Citizen
p1berth char(1) Yes NULL Passenger 1 Berth
p2name varchar(30) Yes NULL Passenger 2 Name
p2age int(2) Yes NULL Passenger 2 Age
p2sex char(1) Yes NULL Passenger 2 Sex
p2sc varchar(3) Yes NULL Passenger 2 Senior Citizen
p2berth char(1) Yes NULL Passenger 2 Berth
Now I have a form where in I am entering records fro 2 passenger. And storing them in table. After this I want to see the history of booked ticket on basis on PNR No. in jTable but I don't know how to display records of different passengers of same PNR in saperate rows of table.
My program is displaying all passengers in singal row.
Can any one help me?
I hope I am clear on my problem. Screen Shots are attached as jpg file.

Attachments i1.jpg 46.9 KB i2.jpg 24.62 KB
6 Years
Discussion Span
Last Post by masijade
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.