iizzo Posted August 30, 2003 Share Posted August 30, 2003 Mysql help I need help on a query, I\'m trying to get a report on orders that are new on an issue and orders that where in the older issue but not in the current one ID order_ID issue_number ------------------------------------ 1 1 555 2 1 556 3 2 555 4 1 557 5 2 556 6 2 557 6 1 558 I can\'t get it right Please help I\'m using MySQL 4.0.13 PHP 4.2.3 Quote Link to comment Share on other sites More sharing options...
nysebamse Posted September 1, 2003 Share Posted September 1, 2003 \"SELECT * FROM table_name WHERE issue_number != 555\"; Replace 555 with variable that holds the current issue_number. \"SELECT * FROM table_name WHERE issue_numer != $current_issue\"; Quote Link to comment Share on other sites More sharing options...
akitchin Posted September 1, 2003 Share Posted September 1, 2003 one minor correction to that second query: \"SELECT * FROM table_name WHERE issue_numer != \'$current_issue\'\"; 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.