Are you saying that the data base contains a string equal to '001' instead of a number 1?
Main Topics
Browse All Topicswhere product.ProductId = $AccNo
when $AccNo = 1 then it can select product.ProductId that equall 001 or 01 how can i force it select
exactly
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
CREATE TABLE IF NOT EXISTS `product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ProductId` varchar(80) DEFAULT NULL,
`ProductName` varchar(255) DEFAULT NULL,
`ProductType` varchar(255) DEFAULT NULL,
`ProductPrice` varchar(255) DEFAULT NULL,
`ProductQuantity` varchar(255) DEFAULT NULL,
`DateTime` datetime DEFAULT NULL,
`TimeStamp` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `ProductId` (`ProductId`),
KEY `ProductId_2` (`ProductId`),
KEY `ProductName` (`ProductName`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
CREATE TABLE IF NOT EXISTS `presell` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`refid` int(11) NOT NULL,
`productcode` varchar(100) NOT NULL,
`productname` varchar(200) NOT NULL,
`qutiy` int(11) NOT NULL,
`price` decimal(11,2) NOT NULL,
`datecreate` datetime DEFAULT NULL,
`timestamp` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`order` enum('y','n') NOT NULL DEFAULT 'n',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_ref_prod` (`refid`,`productcode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=257 ;
Business Accounts
Answer for Membership
by: Ray_PaseurPosted on 2009-10-21 at 06:30:52ID: 25623676
Use (int) to cast the value.