john_6767 Posted August 18, 2006 Share Posted August 18, 2006 i have a database that has " in some of the names of the fields and i am trying to write some sql to update these fields by replacing " with the word 'inch'. How would i go about doing this? php is having trouble with the "... Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 18, 2006 Share Posted August 18, 2006 In the names of the fields, or the data in the fields?Trivial example below works:[code]<?php$old = 'This is a six" nail';$new = str_replace('"',' inch',$old);echo $new;?>[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted August 18, 2006 Share Posted August 18, 2006 MySQL has a replace function as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.