Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.  Usually you can use a function in the driver that can take care of that.  However, if all you need is too escape a single quote, you can also use the double quote method:
 

reliability is key to gain customers' loyalty

becomes

reliability is key to gain customers'' loyalty