Re: [PHP-DB] str_replace question

2005-01-06 Thread Brent Baisley
I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually be looking to use an array for your search words in str_replace(), or perhaps grep. On Jan 5,

Re: [PHP-DB] str_replace question

2005-01-06 Thread Bastien Koert
-db@lists.php.net Subject: Re: [PHP-DB] str_replace question Date: Thu, 6 Jan 2005 09:20:47 -0500 I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually

RE: [PHP-DB] str_replace question

2005-01-06 Thread Norland, Martin
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based on some

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Brent Baisley wrote: I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually be looking to use an array tried to explain that to him already, either he

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Sorry if this already went through, my SMTP server was having problems. Hi there everyone, Im having a weird problem and Im not sure why, if I try to replace WHERE AND with just WHERE it wont do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Hi there everyone, Im having a weird problem and Im not sure why, if I try to replace WHERE AND with just WHERE it wont do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH of them from a single string, is something wrong below? $additionalsql

Re: [PHP-DB] str_replace question

2005-01-05 Thread Jason Wong
On Thursday 06 January 2005 09:38, Chris Payne wrote: Im having a weird problem and Im not sure why, if I try to replace WHERE AND with just WHERE it wont do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH of them from a single string, is

Re: [PHP-DB] str_replace question

2005-01-05 Thread graeme
Hi, Wild guess but does the original WHILE AND have two spaces between the WHILE and the AND? us an echo before and after and count the number of spaces. But yes it would be possible to avoid this with the judicious appearance of an if statement. graeme Chris Payne wrote: Sorry if this already