troubleshooting Question

Can't select record on a certin Field.

Avatar of teksavers
teksavers asked on
MySQL ServerPHP
2 Comments2 Solutions302 ViewsLast Modified:
My question is this, I am doing a simple Select in a table against the product field. I cannot get any returns when I know that the record is there. I can do the same query against the productid field and get a result. Not sure what I am doing wrong.

SELECT * FROM `xcart_products` WHERE `product` LIKE "VWIC-1MFT-E1"
MySQL returned an empty result set (i.e. zero rows). (Query took 0.2667 sec)
But its there...
Here is the Table:
CREATE TABLE IF NOT EXISTS `xcart_products` (
  `productid` int(11) NOT NULL auto_increment,
  `productcode` varchar(32) NOT NULL default '',
  `product` varchar(255) NOT NULL default '',
  `provider` varchar(32) NOT NULL default 'master',
  `distribution` varchar(255) NOT NULL default '',
  `weight` decimal(12,2) NOT NULL default '0.00',
  `list_price` decimal(12,2) NOT NULL default '0.00',
  `descr` text NOT NULL,
  `fulldescr` text NOT NULL,
  `avail` int(11) NOT NULL default '0',
  `rating` int(11) NOT NULL default '0',
  `forsale` char(1) NOT NULL default 'Y',
  `add_date` int(11) NOT NULL default '0',
  `views_stats` int(11) NOT NULL default '0',
  `sales_stats` int(11) NOT NULL default '0',
  `del_stats` int(11) NOT NULL default '0',
  `shipping_freight` decimal(12,2) NOT NULL default '0.00',
  `free_shipping` char(1) NOT NULL default 'N',
  `discount_avail` char(1) NOT NULL default 'Y',
  `min_amount` int(11) NOT NULL default '1',
  `dim_x` int(11) NOT NULL default '0',
  `dim_y` int(11) NOT NULL default '0',
  `dim_z` int(11) NOT NULL default '0',
  `low_avail_limit` int(11) NOT NULL default '10',
  `free_tax` char(1) NOT NULL default 'N',
  `product_type` char(1) NOT NULL default 'N',
  `manufacturerid` int(11) NOT NULL default '0',
  `return_time` int(11) NOT NULL default '0',
  `keywords` varchar(255) NOT NULL default '',
  `cond` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`productid`),
  UNIQUE KEY `productcode` (`productcode`,`provider`),
  KEY `rating` (`rating`),
  KEY `add_date` (`add_date`),
  KEY `provider` (`provider`),
  KEY `avail` (`avail`),
  KEY `best_sellers` (`sales_stats`,`views_stats`),
  KEY `categories` (`forsale`),
  KEY `fi` (`forsale`,`productid`),
  KEY `fia` (`forsale`,`productid`,`avail`),
  KEY `ppp` (`productcode`,`provider`,`productid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=90810 ;


not sure what I am doing wrong.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros