Results 1 to 1 of 1

Thread: mysql empty set

  1. #1
    cucucur is offline Member
    Join Date
    Apr 2011
    Posts
    20
    Rep Power
    0

    Default mysql empty set

    hi! I'm driving crazy!!

    I have a java code which runs mysql. I have a huge query, that could return "empty set" if some value is not correct, what I want to do is insert in this value "something", maybe "void" or "0":

    My database:

    PHP Code:
    mysql> select * from usuarios;
    +-----------+--------+
    | usuarioID | codigo |
    +-----------+--------+
    |         1 |    456 |
    |         2 |    789 |
    |         3 |    123 |
    +-----------+--------+
    3 rows in set (0.00 sec)
    My "empty" consult:

    PHP Code:
    
    mysql> SELECT usuarioID FROM usuarios WHERE codigo = 45;
    Empty set (0.00 sec)
    What I want:

    PHP Code:
    +-----------+
    | usuarioID |
    +-----------+
    |      Void |
    +-----------+
    Is it possible? thank you!!
    Last edited by cucucur; 04-25-2011 at 04:03 PM.

Similar Threads

  1. Empty Form?
    By Vorfin in forum New To Java
    Replies: 13
    Last Post: 07-05-2010, 12:54 AM
  2. Empty FileInputStream..
    By dudejonne in forum New To Java
    Replies: 5
    Last Post: 11-08-2009, 09:21 PM
  3. MySQL/JDBC Mysql query output
    By thelinuxguy in forum Advanced Java
    Replies: 4
    Last Post: 02-13-2009, 02:57 AM
  4. KeyBindings Empty Key?
    By Unome in forum Java Applets
    Replies: 1
    Last Post: 10-24-2008, 08:28 PM
  5. Empty ResultSet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-09-2008, 09:36 PM

Posting Permissions

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