Posted By

assbach on 02/11/07


Tagged

mysql select replace special characters


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

basicmagic


SELECT REPLACE


 / Published in: SQL
 

This replaces a special character (used as a delimitter in a string i.e.) with some other char

  1. <?php
  2.  
  3. $query = "
  4. SELECT
  5. id, REPLACE(names,'".chr(29)."',', ') as namestring
  6. FROM
  7. table
  8. ";
  9.  
  10. ?>

Report this snippet  

You need to login to post a comment.