#1
  1. No Profile Picture
    mrtesting
    Guest
    Devshed Newbie (0 - 499 posts)
    the table quotes have the field cat which can store strings from '1','2',..'100'

    how do i select all the records in the table quotes which have the field '2' ?

    how do i select all the records in the table quotes which have the field '2' and '3' ?


    thanks a lot. or do the table need to be redesigned.
  2. #2
  3. No Profile Picture
    Pointman
    Guest
    Devshed Newbie (0 - 499 posts)
    Try this:

    SELECT * FROM cat WHERE ( id <=3 and id >= 2)
  4. #3
  5. No Profile Picture
    Pointman
    Guest
    Devshed Newbie (0 - 499 posts)
    Sorry, misread the post....

    SELECT * FROM yourtable WHERE ( cat <=3 and cat >= 2)

Similar Threads

  1. select in a select box by typing??
    By ihugo in forum HTML Programming
    Replies: 1
    Last Post: October 21st, 2003, 10:57 AM
  2. select across multiple tables (UNION)
    By vickistanfield in forum MySQL Help
    Replies: 3
    Last Post: September 26th, 2003, 08:05 PM
  3. SELECT something FROM (SELECT something2 FROM ...) ...
    By loudo in forum Firebird SQL Development
    Replies: 3
    Last Post: August 21st, 2003, 04:27 AM
  4. creating a select dynamically (search functions)
    By Maarten Martens in forum MySQL Help
    Replies: 1
    Last Post: July 23rd, 2003, 07:52 AM
  5. select box changes other select box...
    By etherwolf in forum PHP Development
    Replies: 6
    Last Post: October 11th, 2001, 11:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo