1
zite83
MySQL and quotes
  • 2006/9/27 19:57

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


I understand that quotes can stop a MySQL statment. I was wondering whats the propper way to get arround this issue.

Lets say I have this
$variable= "The boat's color is red" ;

$Query = "INSERT INTO ".$xoopsDB->prefix("some_table")." (variable) VALUES ('$variable');

$Insert = $xoopsDB->query($Query);

I was wondering how I can insert that text into MySQL with out altering it so the query statment dosn't fail.

Thanks