This is a discussion on "[SOLVED] Partial Search Query" within the Databases section. This forum, and the thread "[SOLVED] Partial Search Query are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Partial Search Query
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Partial Search Query
I'm having trouble with this query: what's the syntax I need to use so that it will search to see if a field has a partial name?
The system I have reads from an RSS feed, and posts topics on my forums from it. It takes two variables from the feed to create the title, which is done in a "Name - Class" format. This query is to search for just the name part, so how can I do it so it will query the database and pull the appropriate part knowing just the first part? Thanks in advance! |
|
|
|
#2
|
|||
|
|||
|
Re: Partial Search Query
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#3
|
||||
|
||||
|
Re: Partial Search Query
If the info you have is in the one column, you will need to use LIKE
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#4
|
||||
|
||||
|
Re: Partial Search Query
Here is a class file I have written, it searches or the provided word returning true or false if something is found then adds it to data member.
The second function will show all the results and the third tells us how many blog entries there are. You will need to edit the SQL and how is outputted in the second function.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#5
|
|||
|
|||
|
Re: Partial Search Query
I didn't know it would be as simple as LIKE =)
That should do it, going to update scripts right now. Thank you |
|
#6
|
||||
|
||||
|
Re: [SOLVED] Partial Search Query
There are more advanced methods which give much better results, but I created that for my blog and it worked fine.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search Bar CONCAT query | meth8200 | Databases | 2 | May 13th, 2008 22:00 |
| [SOLVED] Nightmare query | AdRock | Databases | 0 | Nov 17th, 2007 15:50 |
| search query to google as <iframe> source | vHTML | JavaScript Forum | 1 | Jan 14th, 2007 17:52 |
| [SOLVED] asp / sql query | Anonymous User | Classic ASP | 4 | Nov 19th, 2004 08:39 |