RE: [PHP-DB] variable operators in queries

2001-10-22 Thread Rick Emery
Is the the EXACT code you used? If it is, I can see why it failed. You're trying to assign the text to "sql" not "$sql". sql="SELECT * FROM poeple WHERE age $Date_operator 20"; If, in fact, you are assigning to $sql, then print out $sql to ensure it contains what you expect it to contain.

Re: [PHP-DB] variable operators in queries

2001-10-19 Thread DL Neil
> Is it possible to put variable operators in queries? =I can see no reason why not - you're not actually putting the 'variable' in the 'query', just using a PHP-variable to build a PHP-string which will be sent to MySQL as a SQL query... > I tried this (the real variable comes from a form) > $