Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 9th, 2012, 08:30 AM
Friend of Wrox
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default comparing integers within string values

I have some string values stored in a database table for the screen sizes of laptops like 14 inches, 15.6 inches, 16 inches and so on. These values are being searched using an advanced search option which uses a range of values like:

less than 14 inches
14-15 inches
15-16 inches
16-18 inches

How can I use the above search criteria to get the values from the database to show me all the screen sizes that lie within the range:
15-16 inches

I have tried using comparison operators but the correct results are not shown. It either shows the starting values or the ending values. Not the ones in between the range.

Please help me out on this as I require this urgently.

Thanks in Advance

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing Two values from same table MArgente BOOK: Beginning SQL 3 December 11th, 2009 07:35 AM
comparing strings and integers pcase XSLT 2 December 1st, 2007 06:55 AM
Comparing values between different MSHFlexGrid davekrunal46 VB How-To 0 November 28th, 2005 07:41 AM
Comparing values between different MSHFlexGrid davekrunal46 Beginning VB 6 0 November 28th, 2005 07:38 AM
getting Integers from the query string TadReeves JSP Basics 2 March 16th, 2005 01:22 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.