On Tue, 1 May 2001, Gerald Clark wrote:

> 1. Read the manual
> 2. Read the manual
> 3. get a book on SQL
> 
> 
> Selvin Sakal wrote:
> 
> > My computer didn't explode i just wrote that to get attention. My question
> > is this - I have a database with a table which looks like this -
> > 
> > CREATE TABLE sites
> > (
> > ID INT NOT NULL AUTO_INCREMENT,
> > name VARCHAR(30) NOT NULL,
> > keywords VARCHAR(200) NOT NULL DEFAULT 0,
> > description VARCHAR(200) NOT NULL DEFAULT 0,
> > url VARCHAR(50) NOT NULL,
> > rank blob NOT NULL,
> > PRIMARY KEY (ID)
> > );
> > 
> > there is a index on keywords and description
> > 
> > what i would like to know is how to search description to see if it 
> > contains a word like 'web'.

select * from sites where description like '%web%'

> > 
> > i would also like to know how to search description and keyword for 
> > specific
> > words like this -
> > 
> > say description has 'the best search engine on the net'
> > 
> > i want to search for all the descriptions that contain 'best' and 'net'.
> > 

select * from sites where description like '%best%' AND description  like 
'%net%'

> > If i don't get help soon my computer might explode.
> > 

Uf,

Ajdin

> > _________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> > 
> > 
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >   http://www.mysql.com/manual.php   (the manual)
> >   http://lists.mysql.com/           (the list archive)
> > 
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail 
> > <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> -- 
> Gerald L. Clark
> [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to