Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-03-2007, 03:51 PM #1
- Join Date
- Dec 2006
- Thanked 0 Times in 0 Posts
Check rows in a table (see if $title contains X but not X) and find a matching row...
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;
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 ;
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,