Jump to content

Archived

This topic is now archived and is closed to further replies.

john_6767

help with update query

Recommended Posts

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 "...

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
MySQL has a replace function as well.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.