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! 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 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 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 Link to comment https://forums.phpfreaks.com/topic/257646-using-not-boolean/#findComment-1320545 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.