jeff5656 Posted February 23, 2012 Share Posted February 23, 2012 What is correct syntax to exclude value for the field named "field2": $query = "select * from tasks where task_id = '". $ttt['id'] ."' and help_status='$hh_task' and field2 NOT = '0000-00-00' "; Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/257646-using-not-boolean/ Share on other sites More sharing options...
smerny Posted February 23, 2012 Share Posted February 23, 2012 remove the = after NOT Quote Link to comment https://forums.phpfreaks.com/topic/257646-using-not-boolean/#findComment-1320538 Share on other sites More sharing options...
jeff5656 Posted February 23, 2012 Author Share Posted February 23, 2012 That gave me a syntax error Quote Link to comment https://forums.phpfreaks.com/topic/257646-using-not-boolean/#findComment-1320543 Share on other sites More sharing options...
Zane Posted February 23, 2012 Share Posted February 23, 2012 http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_not-equal , != Not equal: mysql> SELECT '.01' '0.01'; -> 1 mysql> SELECT .01 '0.01'; -> 0 mysql> SELECT 'zapp' 'zappp'; -> 1 Quote Link to comment https://forums.phpfreaks.com/topic/257646-using-not-boolean/#findComment-1320545 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.