Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-23-2008, 09:51 PM   PM User | #1
ruffy
New Coder

 
Join Date: Jul 2008
Posts: 39
Thanks: 4
Thanked 0 Times in 0 Posts
ruffy is an unknown quantity at this point
I cannot get this STR_REPLACE to work

How do I modify the Mysql query string in PHP for the following
str_replace function?
I don't know how to do it.

$query = str_replace("WHERE","WHERE prospectid > \"$prospectID\" AND",$query);
ruffy is offline   Reply With Quote
Old 07-23-2008, 10:09 PM   PM User | #2
Webmonkey
New Coder

 
Join Date: Apr 2006
Location: Tadley, UK
Posts: 63
Thanks: 5
Thanked 0 Times in 0 Posts
Webmonkey is an unknown quantity at this point
Hmm, Not sure why it might not work, unless the variables are colliding.
PHP Code:
$query1 str_replace("WHERE""WHERE `prospectid` > {$prospectID} AND"$query); 
let me know if you are having any more problems!

The only other thing I can think of is the case of the text, in which case use str_ireplace (case insesitive version).
__________________
Steven Gibbons
klearconcepts@gmail.com
Webmonkey is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:48 AM.


Advertisement
Log in to turn off these ads.