Escape a single quote in MySQL when using update string inside PHP Variable -


i'm trying replace single quote mark when importing data using load data local file mysql... here query in php

$sql = "load data local infile 'uploaded_files/uploaded.csv'         table results         fields terminated ','         optionally enclosed '\"'          lines terminated '\\r\\n'         ignore 1 lines         (place, racenumber, time, firstname, surname, category,          firstingroup, notes, additionalnotes, club, fullname)         set randomcode = '" .$random_code. "',         distance = '" .$_post["distance"]."',         location = '" .$_post["location"]."',         distancename = '" .$_post["distancename"]."',         intyear = '" .$_post["intyear"]."',         racedate = '" .$_post["racedate"]."',         race = '" .$_post["race"]."',         event = '" .$_post["event"]."',         raceid = '" .$_post["raceid"]."',         time = replace(time,'.',':'),         fullname = replace(fullname,''','''');         "; 

my problem fullname = replace(fullname,''',''''); doesn't work, need replace ' '' inside string, how should line look?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -