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 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 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 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 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.