preg_match_all erasing everything with apostrophes

I have read every forum on the topic is seems like but I can not figure this out.
I am processing data into a MySQL database using a php script and when it is being processed all values containing an apostrophe (single quote) is not passed into the database.

I am using preg_match_all("/\w|\W|\s|\’/", &data, &matches) with no avail. I have used MANY variations of this but still cannot get the data to load properly.

If anyone has had this similar issue and figured out a way to solve it, or if you are just brilliant and can fix this I would be so forever grateful.

Thank you in advance.

Hey Jared

Try to use the values you are currently using in your query and paste it directly into SQL to see if SQL reports any errors. I noticed my SQL database would not update anything with the curvy apostrophes you some times find online, but by using the straight ones ’ that would update the query.

If SQL does not report any errors but just sends blank values again, try to build the query from your SQL and see how your SQL would format it.

Sponsor our Newsletter | Privacy Policy | Terms of Service