Re: [PHP] Mysql strategy

2006-11-22 Thread Dotan Cohen
On 22/11/06, tedd <[EMAIL PROTECTED]> wrote: At 1:50 PM +0200 11/22/06, Dotan Cohen wrote: >Thanks, Richard. I'm looking into the full text index again. > >Dotan Cohen Dotan: The following is a great reference -- the code works and it gave me the basics to do full-text searches. http://www.php

Re: [PHP] Mysql strategy

2006-11-22 Thread tedd
At 1:50 PM +0200 11/22/06, Dotan Cohen wrote: Thanks, Richard. I'm looking into the full text index again. Dotan Cohen Dotan: The following is a great reference -- the code works and it gave me the basics to do full-text searches. http://www.phpfreaks.com/tutorials/129/0.php Go though tha

Re: [PHP] Mysql strategy

2006-11-22 Thread Dotan Cohen
On 21/11/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sun, November 12, 2006 6:02 pm, Dotan Cohen wrote: > If I have to perform 30 LIKE searches for different keywords in a > varchar field, which strategy would be recommended: > 1) 30 searches, one for each keyword > 2) To select the varchar f

Re: [PHP] Mysql strategy

2006-11-15 Thread David Tulloh
Chris wrote: David Tulloh wrote: Dotan Cohen wrote: If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword 2) To select the varchar field from all the rows, and search through them with php's arr

Re: [PHP] Mysql strategy

2006-11-14 Thread Dotan Cohen
On 14/11/06, Larry Garfield <[EMAIL PROTECTED]> wrote: As a general rule, I try to push as much logic into the query as I can for the simple reason that MySQL is optimized C and my PHP code gets interpreted. The odds of me writing something in PHP that's faster than MySQL AB's C code are slim. :-

Re: [PHP] Mysql strategy

2006-11-14 Thread Raphael Martins
Larry Garfield escreveu: On Monday 13 November 2006 17:51, Chris wrote: It's not going to make a great deal of difference if you do the processing in the MySQL or the PHP, in this case it's basically the same operation in each. I suspect that efficiently recreating the LIKE functionality in

Re: [PHP] Mysql strategy

2006-11-13 Thread Larry Garfield
On Monday 13 November 2006 17:51, Chris wrote: > > It's not going to make a great deal of difference if you do the > > processing in the MySQL or the PHP, in this case it's basically the same > > operation in each. I suspect that efficiently recreating the LIKE > > functionality in PHP wouldn't b

Re: [PHP] Mysql strategy

2006-11-13 Thread Chris
David Tulloh wrote: Dotan Cohen wrote: If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword 2) To select the varchar field from all the rows, and search through them with php's array functions?

Re: [PHP] Mysql strategy

2006-11-13 Thread Robert Cummings
On Tue, 2006-11-14 at 00:51 +1100, David Tulloh wrote: > Dotan Cohen wrote: > > If I have to perform 30 LIKE searches for different keywords in a > > varchar field, which strategy would be recommended: > > 1) 30 searches, one for each keyword > > 2) To select the varchar field from all the rows, an

Re: [PHP] Mysql strategy

2006-11-13 Thread David Tulloh
Dotan Cohen wrote: If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword 2) To select the varchar field from all the rows, and search through them with php's array functions? It's not going to m

Re: [PHP] Mysql strategy

2006-11-13 Thread Dotan Cohen
On 13/11/06, David Tulloh <[EMAIL PROTECTED]> wrote: Dotan Cohen wrote: > If I have to perform 30 LIKE searches for different keywords in a > varchar field, which strategy would be recommended: > 1) 30 searches, one for each keyword > 2) To select the varchar field from all the rows, and search t

Re: [PHP] Mysql strategy

2006-11-13 Thread Dotan Cohen
On 13/11/06, Chris <[EMAIL PROTECTED]> wrote: Dotan Cohen wrote: > If I have to perform 30 LIKE searches for different keywords in a > varchar field, which strategy would be recommended: > 1) 30 searches, one for each keyword No. Horribly inefficient. > 2) To select the varchar field from all t

Re: [PHP] Mysql strategy

2006-11-12 Thread Chris
Dotan Cohen wrote: If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword No. Horribly inefficient. 2) To select the varchar field from all the rows, and search through them with php's array fu

[PHP] Mysql strategy

2006-11-12 Thread Dotan Cohen
If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword 2) To select the varchar field from all the rows, and search through them with php's array functions? There are about 500 rows in the table, a