Welcome Guest, Not a member yet? Register   Sign In
Cannot test if a field is empty or not
#1

[eluser]caperquy[/eluser]
Hello
I am implementing an application where I have to test if a field is empty or not. That field is defined within PhpMySQL as follows :
Field name : DIVERS
Type : varchar(80)
Interclassement : latin1_swedish_ci
Null : No (non)
Defaut : None (aucun)
There are cases where nothing has been put into the field. Nevertheless whenever I test that field in the controller using an instruction such as
Code:
if (empty($DIVERS))
    {
        echo "DIVERS empty<br />";
    }else{
        echo "DIVERS not empty<br />";
}
the Else part of the if condition is always executed.
The same occurs if I use is_null
Could someone give me a clue ? Thanks in advance.
CapErquy


Messages In This Thread
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 04:59 AM
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 05:49 AM
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 07:55 AM
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 09:03 AM
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 09:06 AM
Cannot test if a field is empty or not - by El Forum - 01-24-2011, 02:47 PM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:09 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:14 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:17 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:21 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:37 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 04:52 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 05:00 AM
Cannot test if a field is empty or not - by El Forum - 01-25-2011, 09:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB