You probably use PHP.
Try this before you execute your query:

add_slashes('$string');

If the information in your string contains signs like ' , they will be stored as \' .
Without something like this your query will be broken by the sign ' because the script will see this as a part of the query instead of information wich is to be stored.

Hope this helps