I am trying to save datas with quotes and special characters to my mysql database keep getting errors.

for example this data....
<a href="http://www.tomaysite.com">this is a long text with ' and a " on the text</a>
when I am trying to save this kind of data in my database I got mysql error but if the data have no double quote or sigle quote no problem.

I tried to use addslashes but still got same error...

Any way to solve this problem? Thanks