Re: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread Chris
benmoreassynt wrote: Index details: contents 0 PRIMARY 1 id A 56 NULL NULL BTREE contents 1 fulltextindex 1 fulltext NULL 1 NULL NULL YES FULLTEXT I tried indexing all the fields separately and together (for example an index that included fulltext, startdate and enddate). In fact m

Re: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread benmoreassynt
Index details: contents 0 PRIMARY 1 id A 56 NULL NULL BTREE contents 1 fulltextindex 1 fulltext NULL 1 NULL NULL YES FULLTEXT I tried indexing all the fields separately and together (for example an index that included fulltext, startdate and enddate). In fact more complex indexing onl

[PHP-DB] part of url link to webform Question.

2006-11-29 Thread JeRRy
Hi, Due to the increase in spam I have had to change the way I get people to email me on my business website. So instead of people replying via the reply function in their email client they need to reply using my wesbite each time. But I want to keep track of each email in a similiar way as I

Re: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread Chris
benmoreassynt wrote: Yeah, I had thought of a subquery, but had not got far with it. I just edited the query to this: SELECT `id`, LOCATE('my search text', `fulltext`) FROM `contents` WHERE MATCH (`fulltext`) AGAINST ('"my search text"' IN BOOLEAN MODE) AND `id` IN (SELECT `id` FROM `contents`

RE: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread benmoreassynt
Yeah, I had thought of a subquery, but had not got far with it. I just edited the query to this: SELECT `id`, LOCATE('my search text', `fulltext`) FROM `contents` WHERE MATCH (`fulltext`) AGAINST ('"my search text"' IN BOOLEAN MODE) AND `id` IN (SELECT `id` FROM `contents` WHERE `somefield` <= "

RE: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread benmoreassynt
Yeah, I had thought of a subquery, but had not got far with it. I just edited the query to this: SELECT `id`, LOCATE('my search text', `fulltext`) FROM `contents` WHERE MATCH (`fulltext`) AGAINST ('"my search text"' IN BOOLEAN MODE) AND `id` IN (SELECT `id` FROM `contents` WHERE `somefield` <= "

Re: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread Chris
benmoreassynt wrote: Hi, I have a query which works successfully, but which has the potential to be slow as the database grows. The query is: SELECT `id`, LOCATE('my search string', `fulltext`) FROM `contents` WHERE MATCH (`fulltext`) AGAINST ('"my search string"' IN BOOLEAN MODE) So it is ge

RE: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread benmoreassynt
Yeah, I had thought of that, but had not got far with it. I'll have another go as I was getting errors last time. Bastien Koert wrote: > Have you tried limiting it first via a subselect and then doing the full > text match? > > bastien > > >>From: benmoreassynt <[EMAIL PROTECTED]> >>To: php-db

RE: [PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread Bastien Koert
Have you tried limiting it first via a subselect and then doing the full text match? bastien From: benmoreassynt <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Speeding up a query by narrowing it down Date: Wed, 29 Nov 2006 21:02:03 -0500 Hi, I have a query which works succe

[PHP-DB] Speeding up a query by narrowing it down

2006-11-29 Thread benmoreassynt
Hi, I have a query which works successfully, but which has the potential to be slow as the database grows. The query is: SELECT `id`, LOCATE('my search string', `fulltext`) FROM `contents` WHERE MATCH (`fulltext`) AGAINST ('"my search string"' IN BOOLEAN MODE) So it is getting the ID and locati

[PHP-DB] Re: Transfer data between tables in MySQL

2006-11-29 Thread benmoreassynt
Rosen wrote: > Hi, > I have to transfer all data between two tables ( with identical structure > ) Is this possible with one query, or I must read from table1 and manually > insert into table2? > > Thanks in advance, > Rosen INSERT INTO `dbase2`.`table1` SELECT * FROM `dbase1`.`table1` ; That w

Re: [PHP-DB] Transfer data between tables in MySQL

2006-11-29 Thread Rosen
Thanks very much! Before I try something like "insert into tableb values (select * from tablea)" and it didn't work, but now I see the word "values" is no needed. Thank you ""Bastien Koert"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > insert into tableb (select * from tablea) >

Re: [PHP-DB] Transfer data between tables in MySQL

2006-11-29 Thread Rosen
Thanks very much! Before I try something like "insert into tableb values (select * from tablea)" and it didn't work, but now I see the word "values" is no needed. Thank you ""Bastien Koert"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > insert into tableb (select * from tablea) >

RE: [PHP-DB] Transfer data between tables in MySQL

2006-11-29 Thread Bastien Koert
insert into tableb (select * from tablea) bastien From: "Rosen" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Transfer data between tables in MySQL Date: Wed, 29 Nov 2006 13:44:24 +0200 Hi, I have to transfer all data between two tables ( with identical structure ) Is this po

[PHP-DB] Transfer data between tables in MySQL

2006-11-29 Thread Rosen
Hi, I have to transfer all data between two tables ( with identical structure ) Is this possible with one query, or I must read from table1 and manually insert into table2? Thanks in advance, Rosen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un