uot;;
}
break;
}
[/CODE]
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
> -Original Message-
> From: bill [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 11:10 AM
> To: [E
On Sun, 6 May 2001, Jamie Saunders wrote:
> Hi,
>
> I've set up a MySQL database and an HTML search form. I'd like to know how
> to search the database with whatever it entered into the form. It only
> needs to be a simple search, returning anything that matches the word(s)
> entered into the i
Hi,
I've set up a MySQL database and an HTML search form. I'd like to know how
to search the database with whatever it entered into the form. It only
needs to be a simple search, returning anything that matches the word(s)
entered into the input box in the form. Thanks.
Jamie Saunders
Ma
> Here are some queries of the above table with their results
> bases='Ft. Worth' returns record 1
> bases LIKE '%Worth%' returns record 1
> bases LIKE '%Ft.%' returns 1 & 2
> bases LIKE '%' returns all records (in this case, 1 & 2)
>
> See?
That makes perfect sense. Thank you!
--
PHP Ge
> > towns = '$town'
> > ...and...
> > towns LIKE '$town'
> >
> > ...are essentially the same without the % wildcard character. Thus,
> >
> > towns = '$town'
> > ...is much different than...
> > towns LIKE '%$town%'
>
> How different are they? I'm not even sure what a wildcard is?
A wildcard
> You've basically got it... the advantage of LIKE is that you can add
> wildcards to specify what can be different...
>
> towns = '$town'
> ...and...
> towns LIKE '$town'
>
> ...are essentially the same without the % wildcard character. Thus,
>
> towns = '$town'
> ...is much different than...
> t
You've basically got it... the advantage of LIKE is that you can add
wildcards to specify what can be different...
towns = '$town'
...and...
towns LIKE '$town'
...are essentially the same without the % wildcard character. Thus,
towns = '$town'
...is much different than...
towns LIKE '%$town%'
Can anyone tell me what I would use to query a MySQL database in a search?
If the search field, was for example, a variable like "town", would the
results page use something like this? :
$sql = " SELECT * FROM table_name
WHERE towns = \"$town\" ";
I remember seeing someone post somethin
8 matches
Mail list logo