Thread: Query Question

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    15
    Rep Power
    0
    I am writing a short if statement. I want the end result to do something if the value is anything other than blank. How to I distinguish a value of 'empty' - meaning there is no value. ?
    if ($row2[picture_name] > NULL)
    {
    print "good";}
    else{print "no good";}
    Thanx
    Uga
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    I'm not sure where your varialbe is comeing from and if it is really null, but you could try

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    if($row2[picture_name] != "") {
    print "good";
    } esle ...
    [/code]
    Hope that helps.

    Perry

    [This message has been edited by acmearts (edited May 17, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    15
    Rep Power
    0
    if(empty(blah blah)

    Worked out well.

    Thanks
    Uga

Similar Threads

  1. question about vb 6, query and excel
    By rt_hide in forum Visual Basic Programming
    Replies: 0
    Last Post: February 17th, 2004, 03:43 AM
  2. Question on building a join query
    By enetwizard in forum MySQL Help
    Replies: 1
    Last Post: February 2nd, 2004, 05:21 PM
  3. SQL Query question (Joining tables with missing rows)
    By LiquidKernel in forum MySQL Help
    Replies: 4
    Last Post: January 17th, 2004, 11:20 PM
  4. query question
    By ipa in forum MySQL Help
    Replies: 8
    Last Post: January 4th, 2004, 12:38 PM
  5. **mysql get result or mysql query question??
    By minemo in forum PHP Development
    Replies: 4
    Last Post: December 31st, 2003, 01:59 PM

IMN logo majestic logo threadwatch logo seochat tools logo