Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How to delete data from php through GUI in Java?

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to delete data from php through GUI in Java?

    so I have create a program that connects to phpmyadmin and it looks like this :






    I have 3 table from phpmyadmin (film,member,history)

    film table consist of 2 collum :
    *filmcode
    *filmname

    member table consist of 2 collum :
    *idmember
    *name

    history table consist of 4 collums :
    *idmember
    *name
    *filmcode
    *filmname

    And I have several questions :
    1. How to input data to 2 different table at the same time? Like at the image 1 "INPUT MOVIE DATA". I'm using twice executeUpdate (One to film table, and one to history table).
    I'm doing it like this :
    Statement stat = null;
    Statement stat2 = null;
     
    stat.executeUpdate("INSERT INTO film VALUES(\"" + temp3 + "\",\"" + temp4 + "\") ");
    stat2.executeUpdate("INSERT INTO history(filmcode,filmname) VALUES (\"" + temp3 + "\", \"" +temp4 + "\")");
    but it gives me an error. Same problem goes on INPUT MEMBER DATA..

    2. How to make my delete data working? So I'm just input my movie code (in the database its called filmcode) and the program will scan the code and then delete it from my database.

    3. In History menu, I'd like to show what is my latest inputted movie, registered member, and If could last deleted data. How to do that?

    Really Really needs Help.....
    Thank You So Much!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,069
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: How to delete data from php through GUI in Java?

    it gives me an erro
    Please copy and paste full text of error here

  3. #3
    Junior Member
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to delete data from php through GUI in Java?

    @Norm
    Never mind, I'm already solved it myself..
    Another question, I want to make a menu that check is the member already registered with the same name or not.
    For example : in the database, there's already have "Robert" in the query. And if new people wants to input their name "Robert" the program will not allow it.
    How to do that?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,069
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: How to delete data from php through GUI in Java?

    The logic seems simple: When a new member enters a name, check if that name is already registered and if so, do not allow that name.

Similar Threads

  1. Writing data to the java DefaultTableModel
    By dubois.ford in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 1st, 2010, 08:43 PM
  2. how to delete record from checking checkbox value.
    By -_- in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: March 12th, 2010, 06:09 AM
  3. How to move an image (or how to delete one)
    By User in forum AWT / Java Swing
    Replies: 3
    Last Post: December 17th, 2009, 10:25 AM
  4. [SOLVED] how to delete an item from a form
    By mahdi in forum Java ME (Mobile Edition)
    Replies: 3
    Last Post: August 30th, 2009, 01:06 PM
  5. Replies: 1
    Last Post: April 20th, 2009, 11:17 AM