single quote search error

rajesh11
Posts: 52
Joined: Fri Dec 16, 2005 7:41 am

single quote search error

Post by rajesh11 »

We are searching the word containing single quotes like "it's php" but it give errors: /lfScript/searchService:2436: Line 1: syntax error at "s" 000 /lfScript/searchService:2436: SQLPrepare() failed with -1 in the function prepntexis

Please look into this matter
User avatar
John
Site Admin
Posts: 2623
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

single quote search error

Post by John »

Use parameters, don't build the string. E.g.

<SQL "select Fields from Table where Field like $query"></SQL>
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

single quote search error

Post by mark »