Re: Select statement escaping characters question

2004-08-22 Thread Michael Stassen
You are comparing the page_url column to a constant string (the contents of $url_field). Constant strings must be quoted in SQL (otherwise they look like column names). Since you use double quotes around the whole string, you must escape double quotes within the string. Without escaping, you

Select statement escaping characters question

2004-08-22 Thread leegold
Wondered in this example why $url_field apparently must be in quotes ie. escaped quotes? Since the whole php/mysql statement is quotes too wouldn't it interpolate correctly w/out added quotes? What's the idea behind it? I got this off of a a web tutorial. It's a varchar field. Thanks for helping w