Re: [PHP-DB] Database Search Engine ?

2004-02-27 Thread Muhammed Mamedov
I see.
But what if I am using mySQL? 
*by the way, can you tell me from where I get them.

-M.Mamedov

- Original Message - 
From: "Joshua D. Drake" <[EMAIL PROTECTED]>
To: "Muhammed Mamedov" <[EMAIL PROTECTED]>
Cc: "phpdb" <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 12:59 PM
Subject: Re: [PHP-DB] Database Search Engine ?


> Hello,
> 
> I suggest PostgreSQL+TSearch2+OpenFTS...
> 
> 30 minutes to a wonderful search engine.
> 
> On Thu, 26 Feb 2004, Muhammed Mamedov wrote:
> 
> > Anyone knows/uses IMP database search engine?
> > http://www.imptechnology.com/DesktopDefault.aspx?tabid=56
> > 
> > Thanks,
> > M.Mamedov
> > 
> 
> -- 
> Co-Founder
> Command Prompt, Inc.
> The wheel's spinning but the hamster's dead
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database Search Engine ?

2004-02-26 Thread Joshua D. Drake
Hello,

I suggest PostgreSQL+TSearch2+OpenFTS...

30 minutes to a wonderful search engine.

On Thu, 26 Feb 2004, Muhammed Mamedov wrote:

> Anyone knows/uses IMP database search engine?
> http://www.imptechnology.com/DesktopDefault.aspx?tabid=56
> 
> Thanks,
> M.Mamedov
> 

-- 
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database search question

2002-03-30 Thread Mike de Libero

Hmm to do a search on one table it might actually be quicker to do a query
for every thing in the query.  First convert to all lowercase.  Then explode
the query into an array using " " as the delimiter.  Then implode this array
into a list that looks something like this.  "var1","var2"...)  you can do
this by using implode and putting Quotes at the end.  Then in the query you
can use the IN part of the query.  I'm sorry if this is totally incorrect
but I'm going off my memory.  SELECT fields FROM tbl
WHERE tblFields IN ($query)  it might be
INTO but I'm dang sure it is IN.  Go to Zend.com and phpbuilder.com for some
good resources on search engines you can modify it to suit your needs.  I
this helps a little bit.

-Mike
- Original Message -
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 30, 2002 7:15 PM
Subject: [PHP-DB] Database search question


Hi there everyone,

How can I accomplish the following?

I have a table called search,

I have 3 fields, city, country, type

I also have an imput box where you can type in a search word.  What I need
is, say you type in hotels germany, I need the search to break up the
sentence and then search each 3 fields in the DB looking for a match.

So, for example: it would find hotels in type and germany in country, see
that they belong together and then display those results - how can I do
this?

I know I need to splitup my search phrase into individual words to search,
but i'm stuck.

Thanks for any help.

Chris



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Database search question

2002-03-30 Thread J. Scott Johnson

Disclaimer: Its late, I'm tired and I haven't tested this code.  Hope it
helps.

Quick Overview:

//make your dictionaries all lower case for ease
$countries = array( 1 => 'us', 2 => 'germany', 3 => 'australia' );
$cities = array( 1 => 'new york', 2 => 'berlin', 3 => 'sydney' );
$lodging = array( 1 => 'hotel', 2 => 'motel', 3 => 'inn', 3 => 'bed and
breakfast' );

$query = "hotel germany";

//user will put it in wrong case.
$query=strtolower($query);

//loop over each array and use it to figure out what column in table to
query
foreach ($countries as $country) {
if $country
if (strstr($query, $country)) {
$column = "country";
//need to break out of loop here
}
}

Hope it helps and isn't too wrong.  I think you get the idea.  Build up some
data dictionaries that map parts of the input to the columns and the
construct query dynamically.  If you can't figure it out, generate a ui on
the fly asking "By X did you mean?" and then 3 radio buttons to set the
right column.

Scott

-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 30, 2002 10:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Database search question


Hi there everyone,

How can I accomplish the following?

I have a table called search,

I have 3 fields, city, country, type

I also have an imput box where you can type in a search word.  What I need
is, say you type in hotels germany, I need the search to break up the
sentence and then search each 3 fields in the DB looking for a match.

So, for example: it would find hotels in type and germany in country, see
that they belong together and then display those results - how can I do
this?

I know I need to splitup my search phrase into individual words to search,
but i'm stuck.

Thanks for any help.

Chris


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] database search

2001-03-26 Thread CC Zona

In article <99mtsa$85b$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Mark Collins") wrote:

> Hope you can help, I have put a basic database together which add, deletes,
> updates and edits records but I am not sure where to start with searching
> the data base. I have already got it working a bit using ereg and a while
> loop, but it is case sensitive and wont find a match in the middle of a
> string (or at least I dont think it will). Does anyone know of a better way
> to do this?

eregi() is for case-insensitive matching

The preg_* functions allow switching back and forth between case-sensitive 
and case-insensitive subpattern matching within a single pattern.

-- 
CC

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]