[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 will

[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

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 benmoreassynt
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@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

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

2006-11-29 Thread benmoreassynt
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@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

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

2006-11-29 Thread benmoreassynt
only slowed the searches down, or had no effect because MySQl would always stick with the fulltext index. The fields are id filename fulltext startdate enddate series volume Sorry for the multiple posts - my newsreader sucks for some reason. Thanks for your help R Chris wrote: benmoreassynt

[PHP-DB] Re: Just two PHP questions

2006-11-24 Thread benmoreassynt
Chris Carter wrote: I am now trying to run PHP using apache on localhost. Can you please advice: 1) What exactly I need to download for running PHP on Apache. 2) What should be the location of the downloaded PHP folder/file/executable so that it interacts easily with Apache. 3) Settings

[PHP-DB] Re: Just two PHP questions

2006-11-24 Thread benmoreassynt
Chris Carter wrote: I am now trying to run PHP using apache on localhost. Can you please advice: 1) What exactly I need to download for running PHP on Apache. 2) What should be the location of the downloaded PHP folder/file/executable so that it interacts easily with Apache. 3) Settings

[PHP-DB] Fulltext SELECTing only part of a field entry

2006-11-24 Thread benmoreassynt
Hi, Not really sure if this is possible. I am using a fulltext search to search through very large entries. Basically an entry might contain 200,000 words, which are searched for exact matches. What I want to do is SELECT, say, the 300 words surrounding the exact match from the 200,000 word

Re: RE: [PHP-DB] Fulltext SELECTing only part of a field entry

2006-11-24 Thread benmoreassynt
Thank you very much. Could you give me a rough idea of what the MySQL query would look like? I am trying to work out the syntax using string functions like LOCATE, INSTR, SUBSTRING and SUBSTRING_INDEX. Many thanks BMA Steven Cruz wrote: I use to perl scripts to do something like this. But

[PHP-DB] Re: Example of mail()

2006-04-28 Thread benmoreassynt
Renzo Clavijo wrote: ?php if(isset($_REQUEST['send_mail'])){ mail($_REQUEST['address_mail'],$_REQUEST['subject'] $_REQUEST['message']); } I would try something like this: if(isset($_REQUEST['send_mail'])) { mail($_REQUEST['address_mail'],$_REQUEST['subject']

[PHP-DB] Re: Example of mail()

2006-04-28 Thread benmoreassynt
benmoreassynt wrote: I would try something like this: if(isset($_REQUEST['send_mail'])) { mail($_REQUEST['address_mail'],$_REQUEST['subject'] $_REQUEST['message']); unset($_REQUEST); } As a follow up, if you want to use that in a public environment