[ic] SQL search problem

msquared msquared@digitalwizards.com.au
Fri, 5 Jan 2001 10:37:00 +0800


On Thu, Jan 04, 2001 at 04:22:32PM +0300, Sergey Sheykin wrote:

> [query ml=10 more=1 list=1
>  query="
>  select sku, title, price, authors, pubdate, category
>  from products
>  where authors = '[value f_value]'"
> ]
> 
> and inside the [value f_value] meets _'_ character,
> browser show "Internal Server Error" (500), because
> line of SQL-request terminated on a _'_ -character!

Most dialects of SQL required you to place two _'_ characters together to
quote as one _'_ character.  For example:

  query="
  select sku, title, price, authors, pubdate, category
  from products
  where authors = 'that''s the right way to enter an apostrophe'"

This would select products where authors is:

    that's the right way to enter an apostrophe


Now, how you go about making Interchange deal with this, I don't know.
Anyone else?

             2
Regards, /|/|
        /   | (MSquared)
-- 
___________________________________________
M Squared  <msquared@digitalwizards.com.au>
Code monkey (programmer)
Digital Wizards
http://www.digitalwizards.com.au