Jump to content


Photo

Query Question


  • Please log in to reply
2 replies to this topic

#1 iizzo

iizzo
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 30 August 2003 - 05:56 PM

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        5552       1        5563       2        5554       1        5575       2        5566       2        5576       1        558
I can\'t get it right Please help
I\'m using MySQL 4.0.13 PHP 4.2.3

#2 nysebamse

nysebamse
  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationBergen, Norway

Posted 01 September 2003 - 07:42 AM

\"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\";
Go get Firefox![br][br]http://www.mozilla.org/

#3 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 01 September 2003 - 10:21 AM

one minor correction to that second query:

\"SELECT * FROM table_name WHERE issue_numer != \'$current_issue\'\";




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users