Find the answer to your Linux question:
Results 1 to 3 of 3
Hi Friends, I have a code (in a child process created by fork) interacting with MySQL. Now i execute a query and in a while loop there is an if ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2002
    Location
    New Delhi
    Posts
    4

    If condition ignored!!!


    Hi Friends,

    I have a code (in a child process created by fork) interacting with MySQL. Now i execute a query and in a while loop there is an if condition, i'm fetching the rows. if theres an empty record set then i'm breaking from the loop else I'm allocating values of fields to some variables.
    I'm checking whether the record set is null ect.

    After some time (very variable, deviation, not fixed) even if the result should not have any row, the program goes into if and then the process raises an exception and the server gets close.

    I can't figure out why the program is going into that if condition.

    Need Help.
    Thanks

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Is there somewhere that I can look at the code? Maybe you can put it up on a FTP server or something?

  3. #3
    Linux User
    Join Date
    Jul 2002
    Location
    Daytona Beach, FL
    Posts
    487
    Ill bet you are comparing blank to NULL

    "" != NULL
    (empty string is not equal to NULL)

    know what i mean?
    majorwoo

    Quiet brain, or I\'ll stab you with a Q-tip.

  4. $spacer_open
    $spacer_close

Posting Permissions

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