SORU
10 Mayıs 2011, Salı


MySQL dize değiştirin

Bir URL içeren sütun (id, url) var:

http://www.example.com/articles/updates/43
http://www.example.com/articles/updates/866
http://www.example.com/articles/updates/323
http://www.example.com/articles/updates/seo-url
http://www.example.com/articles/updates/4?something=test

Kelime değiştirmek istiyorum "güncellemeler" için "haber". Bir script ile bunu yapmak mümkün mü?

CEVAP
29 Ocak 2013, Salı


UPDATE your_table
SET your_field = REPLACE(your_field, 'articles/updates/', 'articles/news/')
WHERE your_field LIKE '%articles/updates/%'

http://to.ly/iLjP

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • EmperorTigerstar

    EmperorTiger

    14 EYLÜL 2009
  • Missouri Star Quilt Company

    Missouri Sta

    18 ŞUBAT 2009
  • The White House

    The White Ho

    21 Ocak 2006