Update replace.php

Add check if search string is in object.
Rewrite query syntax to correct SQL syntax.
Merge pull request #1 from AmWSerafim/patch-1

Add check if search string is in object.
Rewrite query syntax to correct SQL syntax.

10x to AmWSerafim