|
-
Feb 18th, 2006, 10:55 PM
#1
Thread Starter
Junior Member
Search Script
Hell everyone, I've been making a search script for my website. Iam having troubles with the MySQL databasing though.
What object would query a table for keywords...
Thanks
-
Feb 18th, 2006, 11:16 PM
#2
Member
Re: Search Script
Heres a few ive used:
PHP Code:
# general search
WHERE search_field LIKE '%".$_GET['q']."%'
PHP Code:
# starts with letter "whatever"
WHERE search_field LIKE '".$_GET['q']."%''
PHP Code:
# startes with number
WHERE search_field LIKE '[0-9]%''
PHP Code:
# working with numbers, greated-then and less-then
WHERE search_field < '1970'
_
-
Feb 18th, 2006, 11:22 PM
#3
Thread Starter
Junior Member
Re: Search Script
Ok so the code
PHP Code:
# general search
WHERE search_field LIKE '%".$_GET['q']."%'
Basically searches for keywords 'q',
-
Feb 18th, 2006, 11:32 PM
#4
Member
Re: Search Script
Nope...
$_GET['q']
Will pull the info attached to the url.com?q=whatever
This would search for the keyword q
PHP Code:
WHERE search_field LIKE '%q%'
PHP Code:
WHERE search_field LIKE '%search word%'
_
-
Feb 19th, 2006, 12:20 AM
#5
Thread Starter
Junior Member
Re: Search Script
Ok great thanks for the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|