Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003

    Unanswered: Question about selectStatement


    I have an onlineregistrationsystem for tennisgame, my problem is that when I summerize all the maches some of the matches arent played
    I have declared:
    String res="";
    String query= "SELECT * FROM tid WHERE f1name='anders' AND e1name='andersson' AND f2name='carl' AND e2name=jonsson'";
    res= rs.getString("query");

    (rs is my selectStatement)
    what will happen if no game with the players "anders andersson" and "carl jonsson" has been played? Will my res be set to null or?

    I have tried to check with if(res.equals(null)) and if(res.equals(""))

    but it doesent work.

    How should I overcome this little problem?

    Regards // D_S

  2. #2
    Join Date
    Jan 2004

    Re: Question about selectStatement

    Don't know if you copide and pasted this in from your code but there is a slight error. Missing a ' before jonsson.

    This would result in the query failing and if you are not testing for that then being unable to successfully check the results.

  3. #3
    Join Date
    Dec 2003

    Thank you for taking your time helping me.

    This is just an example what I want to do..... Its not my "real" syntax.
    My "real syntax" is correct. I have tried with other SELECT statements, matches that has been played.

    Thanks again/ D_S

  4. #4
    Join Date
    Jan 2004
    if(res == NULL){...} - The German Perl-Community

  5. #5
    Join Date
    Mar 2009

    What a Refreshing Place

    Hey everybody, it's been way too long since I've popped my head in to say hello to everyone. I've been around looking at all the comments and replies to everyone, but I haven't joined until today ! This forum is very informative and I'm hoping to learn more.

    Looking forward to sharing ideas with everyone! And everyone is so nice (even though you dont even know me yet). It's a lot of fun reading about where everyone is at. I hope everyone has a great weekend and we'll talk soon.

    I'm pretty happy to be here!
    Last edited by r937; 03-20-09 at 23:00.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts