Blank "if" Statements (and MySQL)

admin

Administrator
Staff member
Right, I'm trying to write a particular "if" statement in which the PHP interpreter will fetch a value from a MySQL Database if there IS a value, and if there isn't, I want it to display a message along the lines of "There is no data".

I've got the following:

if ($thirdvalue[7] == NULL)
{
echo "There is no data";
}

And the code before points $thirdvalue to a certain row in the table, which incidently has a "NULL" value (i.e. it is completely blank(. M yproblem is, I cannot get the coding write so that it says (in PHP language) "if $thirdvalue is blank, then display the following".

How can I do this?

Thanks in advance
 
Back
Top