![]() |
MySQL easy syntax question
update category_text set text='this is a problem because it's got an apostrophe in it', keywords='asdf,asdf' where id='1';
Just that the string I want to insert has an apostrophe.. Is that going to mess the syntax up? |
try this
update category_text set text='this is a problem because it\'s got an apostrophe in it', keywords='asdf,asdf' where id='1'; |
Nice thanks!! Now I know why I've seen those things printed around my site sometimes heh
|
google for php html entities
|
if this is for a php script then you can just use http://us3.php.net/mysql_real_escape_string
Code:
$sql = "update category_text set text='".mysql_real_escape_string("this is a problem because it's got an apostrophe in it")."', keywords='asdf,asdf' where id='1';" |
| All times are GMT -7. The time now is 03:30 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123