Hello,
I have a table where I add the items I have. When I receive a new order I get the title of the item the new order contains, and I assign that title the variable $title in the script that is supposed to match/identify the new order with an item in my database.

Here is the database structure;
Code:
CREATE TABLE `items` (
  `item_id` int(11) NOT NULL auto_increment,
  `item_name` varchar(100) NOT NULL default '',
  `price` varchar(30) NOT NULL default '',
  `identify_pos` varchar(50) NOT NULL default '',
  `identify_pos2` varchar(50) NOT NULL default '',
  `identify_neg` varchar(50) NOT NULL default '',
  `identify_neg2` varchar(50) NOT NULL default '',
  `file_name` varchar(100) NOT NULL default '',
  `file_pack` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
So I need the script to see if the title matches any of the items in my database. As soon as the script finds a row where the $title contains identify_pos and identify_pos2 but not identify_neg or identify_neg2 then it should get the item_id of that item and continue. If it can't find any match, then do something else..

Also, identify_pos, identify_pos2, identify_neg and identify_neg2 can be empty but I hope that doesn't make it more difficult.. If it does it is OK if all must contain something.

Maybe I've forgotten to mention something important here but I'mm monitor this thread so just reply.. Is it possible to do that with PHP and if, how can I do it? I'm not that good at PHP so I can't figure out how to do that myself..

Thanks in advance,
/Oskar R