You are on page 1of 3

22-04, 7:35 AM

APP DEVELOPMENT REVIEWER


String value2 = password.getText(); (in order to get the
value of the password)
String value1 = username.getText(); (in order to get
the value of textfield)
String sql = "select * from account where username =
'"+value1+"' and password = '"+value2+"' "; (lead to
database panel, where the variable are declared)
PreparedStatement pst =
connection.prepareStatement("insert into account
values (null,?, ?,?)"); (This three questions mark
represent the value 1-3)
pst.setString(1, value1);
pst.setString(2, value2);
pst.setString(3, value3);
pst.executeUpdate();
x++; (this part where the information
will insert into specific row)
new homepage().setVisible(true); (where does this
form goes after)
String sql ="Select student_id AS 'Student_ID',
student_fname AS 'First Name', student_mname AS
'Middle Name',student_lname AS 'Last
Name',student_bday AS 'Birthdate', student_gender
AS 'Gender',student_address AS 'Address',
student_email AS 'Email', student_cpnumber AS
'Cellphone No.' from stu
22-04, 7:35 AM

dentinfo"; (this is where to declare each variable to its


specific name)
homepage.studenttable.setModel(DbUtils.resultSetToTa
bleModel(rs));
(where the table is being called where the information
above will be displayed)
JOptionPane.showMessageDialog(null, "Please Enter
First Name.", "Message", 1); (this will declare error or
empty textfield)

if (rs.next()){
JOptionPane.showMessageDialog(null,"'"+value7+"'
already exist");
} (this will help to find if this email,last name,
fisrt name or course exist)

dispose(); (for all cancel button)

if(x>0){
JOptionPane.showMessageDialog(null,
"Updated Successfully ", "Message", -1);
dept();
dispose();
} (update button)
else{
JOptionPane.showMessageDialog(null,"Invalid
22-04, 7:35 AM

Credentials","Error",
JOptionPane.ERROR_MESSAGE);
} (warning sign for the wrong credentials)

String table_click =
(studenttable.getModel().getValueAt(row, 0).toString
()); (table update button)

String value1 = rs.getString("student_id");


studentupdate.studentid.setText(value1); (code for
variables in order to get the information)
String sql1 = "delete from studentinfo where
student_id = '" +table_click+"' "; (table delete button)

String sql = "Select * from studentinfo where


student_id = '" +table_click +"' "; (to click the student
id to delete)
DATABASE
\u (database name)
describe (table name)
select * from (table name)

You might also like