ripken204
03-30-2007, 10:39 AM
i have a csv file that im pulling alot of info from and inserting it into a mysql database through the use of php. it pulls the info out using this command
list($lastName) = split('[;]', $buffer[0]);
i have alot more variable than $lastName but $lastName is what i have the problem with. when i go to insert it into the DB is gives me an error saying im using the wrong syntax for a specific entry. it turn out that the last name is O'Neal. there is a ' in the last name... how exactly can i fix this, i cant put quotes around the variable as it will give me an error about using quotes..
list($lastName) = split('[;]', $buffer[0]);
i have alot more variable than $lastName but $lastName is what i have the problem with. when i go to insert it into the DB is gives me an error saying im using the wrong syntax for a specific entry. it turn out that the last name is O'Neal. there is a ' in the last name... how exactly can i fix this, i cant put quotes around the variable as it will give me an error about using quotes..