2011-10-13 33 views
0

嗨我想寫這種類型的MySQL查詢。如何編寫這種類型的mysql查詢?

select image_path, replace(replace(replace(description,\'/images/\',image_path),\'<![CDATA[\',\'\'),\']]>\',\'\') description from test_image_master where ...

如果我從PHP的echo這個查詢它顯示像這樣

select image_path, replace(replace(replace(description,'/images/',image_path),'','') description from test_image_master where ...

缺少<![CDATA[]]>。所以查詢不能正常工作。

我使用的是php和mysql。

我該如何解決這個問題。

請幫幫我。

+0

您的目標是什麼?您需要以何種方式修復數據庫結果?你從哪裏查詢這些東西? –

回答

1

它不會錯過。你只是無法從瀏覽器中看到,你可以檢查html的來源。