Jump to content


Photo

UPDATE com Tags gerando erro

Mysql Tags Update Wordpress

  • Faça o login para participar
2 replies to this topic

#1 Emerine

Emerine

    Normal

  • Usuários
  • 79 posts
  • Sexo:Não informado

Posted 13/12/2015, 04:11

Uso o site em wordpress onde a primeira linha do post_content possui uma tag que quero retirar

 

A tag é: <h3 class=art-postheader>

 

1. Tentei dar um update em todo o banco para substituir <h3 class=art-postheader> para apenas <h3>, mas não consigo ele mostra que 0 linhas foram afetadas

 

2. Outro caso tenho no banco alguns da seguinte forma <h3 class="art-postheader"> com aspas entre "art-postheader" e novamente gerra erro:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'art-postheader">

UPDATE wp_posts
SET post_content =
REPLACE(
post_content,
"<h3 class="art-postheader">",
"<h3>"
);

Alguém sabe o motivo desse update não surtir efeito sendo que o banco realmente eu encontro <h3 class=art-postheader> em post_content

 


#2 Fernando C

Fernando C

    Ativo

  • Usuários
  • 371 posts
  • Sexo:Masculino
  • Localidade:SP

Posted 14/12/2015, 13:03

olha, não entendo nada de wordpress, mas tente direto no mysql com aspas simples em vez de duplas:

update TABELA set post_content =
(replace(post_content, '<h3 class="art-postheader">', '<h3>'))
 where id=2;

aqui ok.



#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 13/09/2017, 16:30

Prezzo Cialis Svizzera generic cialis Cialis Once Daily 5mg Best Price Buy Nexium Uk Horn Viagra Generic Viagra Tadalafil Cialis 10mg Cpr4 viagra cialis Effetti Cialis Generico
Amoxicillin For Vaginal Infection generic cialis Can To Much Visgra Have Opposite Fffect Priligy Usa Expedition Propecia Eyebrow Growth Propecia Efectivo 1 Mg Nebenwirkungen Viagra Pfizer generic cialis Levitra 20mg Generique Prix





1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq