1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I am trying to write a MySQL query which will find a single word (or string of characters) in a column. For example it should be able to find "capital high school" if the query is "high".

    The query I've tried is
    SELECT * FROM schools WHERE name = 'high';

    I know that the % sign is the wildcard character but everytime I try using it the query fails. Can someone show me the EXACT syntax for the query I'm looking for?

    Luke Bowerman
    new media arts
  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    SELECT * FROM schools WHERE name LIKE '%high%';
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    How do you dice up the keyword sting? I'm trying to use php with mySQL?

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