homepage Welcome to WebmasterWorld Guest from 54.197.108.124
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
$query
Question
aff_dan




msg:1245378
 9:13 pm on Jan 3, 2006 (gmt 0)

Hello Sirs,

My php code is like:

$query = 'update wp_posts set post_content=REPLACE(post_content,"Content-Transfer-Encoding: 7bit","Sponsored by")';
$query = 'update wp_posts set post_content=REPLACE(post_content,"Content-Type: text/html; charset=us-ascii","New")';

It is ok ; after the second row? This code doesnt work, maybe is due to ;?

Regards,
Dan

 

bcolflesh




msg:1245379
 9:19 pm on Jan 3, 2006 (gmt 0)

Try \;

Use a backslash to escape any control characters/delimiters in your statement.

aff_dan




msg:1245380
 9:58 pm on Jan 3, 2006 (gmt 0)

Hi bcolflesh,

I got this errror:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mediapr/public_html/news/update.php on line 13
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mediapr/public_html/news/update.php on line 14

$query = 'update wp_posts set post_content=REPLACE(post_content,"PR","RE")'\;
$query = 'update wp_posts set post_content=REPLACE(post_content,"CANNT","MOVE")'\;

Why the script can not make step by step?

IF I will leave:
$query = 'update wp_posts set post_content=REPLACE(post_content,"PR","RE")';

Will works, but if I will add:

$query = 'update wp_posts set post_content=REPLACE(post_content,"PR","RE")';
$query = 'update wp_posts set post_content=REPLACE(post_content,"CANNT","MOVE")';

I mean two queries, then will not work.
WHY?

Regards,
Dan

mm1220




msg:1245381
 11:04 pm on Jan 3, 2006 (gmt 0)

bcolflesh meant you to use \;
here: Content-Type: text/html\;
and not at the end of the statement.

aff_dan




msg:1245382
 11:19 am on Jan 4, 2006 (gmt 0)

Hi,

I have this:

$query = 'update wp_posts set post_content=REPLACE(post_content,"<META http-equiv"Content-Type" content"text/html; charsetUTF-8"><br />","")';

It doesnt change from datbase, where is wrong? Where to add \

Regards,
Dan

inveni0




msg:1245383
 1:56 pm on Jan 4, 2006 (gmt 0)

Try This:

$query = 'update wp_posts set post_content=REPLACE(post_content,"Content-Transfer-Encoding: 7bit","Sponsored by")';
$query = 'update wp_posts set post_content=REPLACE(post_content,"Content-Type: text/html\; charset=us-ascii","New")';

I think this is what they meant.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved