Invalid request SQL

Cathrine D'Amore

New member
Joined
Apr 22, 2024
Messages
15
Points
1
Hi everybody,

i try to modifiy a piece of code on all my website. I used to do it via phpadmin. But in this case there are "" and i think its my issue.


UPDATE `4geH7T_posts` SET `post_content` = replace( `post_content`, '<p style="text-align: ;">', '');

i've tried with \ before ", but i always have : #1604 syntax

if someone have an idea, it will be helpful !

Thank you
 

Leatha Hintz

New member
Joined
Apr 22, 2024
Messages
14
Points
1
Off the top it appears you have unclosed double-quotation marks in your statement. Right where you see the three double-quotation marks at the end of your statement. That is where I would start. Unfortunately without knowing more I can't tell you if this is right or wrong, or what the statement is supposed to actually say.

You can have a look at the following to see how the replace method is supposed to look:
 

Cathrine D'Amore

New member
Joined
Apr 22, 2024
Messages
15
Points
1
Off the top it appears you have unclosed double-quotation marks in your statement. Right where you see the three double-quotation marks at the end of your statement. That is where I would start. Unfortunately without knowing more I can't tell you if this is right or wrong, or what the statement is supposed to actually say.

You can have a look at the following to see how the replace method is supposed to look:
its not a quotation like "double" its 'simple '.
The request is supposed to replace the chain '<p style="text-align: ;">' by nothing so 'empty' quote.

But i found that maybe its the ; before the > because its the command to closed the sql request. If i retire it, the request is good but do nothing cause the chain is not present.

thanks for your idea anyway
 
Top