multiple finder

multiple finder

am 29.06.2009 16:53:22 von Emiliano Boragina

Hi, I must do e finder for properties... I know do a simple search but
not a search like this with more one possibility, with all or some
fields full... How do it?
Thanks a lot

--
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_
=A0 Emiliano Boragina //
=A0 Dise=F1o y Comunicaci=F3n /////////////
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_
=A0 emiliano.boragina@gmail.com ////
=A0 15 40 58 60 02 //////////////////////////
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_

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

Re: multiple finder

am 29.06.2009 17:27:33 von Jason Gerfen

Emiliano Boragina wrote:
> Hi, I must do e finder for properties... I know do a simple search but
> not a search like this with more one possibility, with all or some
> fields full... How do it?
> Thanks a lot

Example database table to search:

TableName
Field001
Field002
Field003

Example SQL to search fields with some or all of the fields matching:
SELECT * FROM `TableName` WHERE `Field001` LIKE 'string' OR `Field002`
LIKE 'string' OR `Field003`;

For future reference the PHP website as well as the MySQL website have
examples for any type of functionality you wish to locate. I would
suggest researching a the 'select' command from the MySQL website:
http://dev.mysql.com/doc/refman/5.0/en/select.html


>
> --
> + _
> Emiliano Boragina //
> Diseño y Comunicación /////////////
> + _
> emiliano.boragina@gmail.com ////
> 15 40 58 60 02 //////////////////////////
> + _
>


--
Jas
"Tomorrow isn't promised so we live for today"

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

Re: multiple finder

am 30.06.2009 07:44:44 von Ankur Singh

Hi,

You can do this by full text searching.
Full text seaching will be 10 times faster than.
Suppose your property name is " Power Bridge " and City name is
"London" in this case any one can fill complete address like "Power
bridge london" or some one can fill like above=A0situation. So in this
case you have to put like on two field and if data is quite large then
your query will be hanged. To overcome with=A0satiation=A0you have to
implement full text searching.
It is very easy to implement . Please follow the instruction written below

Full-text Search is a feature introduced to MySQL in version 3.23.23.
This is how I used it to fix my problem:
I started out with an update to my table:
ALTER TABLE property ADD FULLTEXT(Address, City);
This set ups our Full-text index. The (Address, City) part tells us
that we can search the City and Property for keywords later on. We=92ll
find out how to use this later, once we=92ve overcome a potential
problem.

   =A0MySQL_connect("hostname", "username", "password");
   =A0MySQL_select_db("our_db");
   =A0$query =3D "
   =A0 =A0 =A0SELECT * FROM Property
   =A0 =A0 =A0WHERE MATCH(Address, City) AGAINST ('London')
   =A0";
   =A0$sql =3D MySQL_query($query);
   =A0/* output results */
?>

On Mon, Jun 29, 2009 at 8:23 PM, Emiliano Boragina
wrote:
>
> Hi, I must do e finder for properties... I know do a simple search but
> not a search like this with more one possibility, with all or some
> fields full... How do it?
> Thanks a lot
>
> --
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_
> =A0 Emiliano Boragina //
> =A0 Dise=F1o y Comunicaci=F3n /////////////
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_
> =A0 emiliano.boragina@gmail.com ////
> =A0 15 40 58 60 02 //////////////////////////
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



--
The Gate of Change is Locked on the INSIDE.

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