I am new to php. I am facing problem while inserting record into database that contains ' character.
I am traying to insert this record in database Men's Oxfords Bates High Gloss
But it giving an error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Oxfords Bates High Gloss.
My isert query is :
$iq="INSERT INTO `TABLE 1`(`id`, `title`, `description`, `condition`, `price`, `availability`, `link`, `image_link`, `mpn`, `brand`, `google_product_category`, `Gender`, `Age Group`, `size`, `Color`, `material`, `shipping_weight`, `product_type`, `adwords_labels`)VALUES ('".$cols[$i][0]."','".$cols[$i][1]."','".$cols[$i][2]."','".$cols[$i][3]."','".$cols[$i][4]."','".$cols[$i][5]."','".$cols[$i][6]."','".$cols[$i][7]."','".$cols[$i][8]."','".$cols[$i][9]."','".$cols[$i][10]."','".$cols[$i][11]."','".$cols[$i][12]."','".$cols[$i][13]."','".$cols[$i][14]."','".$cols[$i][15]."','".$cols[$i][16]."','".$cols[$i][17]."','".$cols[$i][18]."')";
where $cols[][] is multinational array that stores tab serrated values from .text file.