This topic is locked

WHERE clause inside Visual Editor

3/23/2007 3:06:48 PM
PHPRunner General questions
K
kenny_robb author

I am trying to change a WHERE clause within visual editor and can't get it to work.
I want to do the following
"ID_owner=" .$_SESSION["var_ID_country"] AND "archive_flag='N'"
First part is fine but as soon as I add the AND and the second part it all falls apart. It may be my syntax or maybe it doesn't support this.
Thanks in anticipation

D
Dale 3/24/2007

A quick stab at this.

Try adding what I have in bold in your query. Im assuming the var_ID_country is a char field. If it is an integer field you wouldnt need the single quotes around " .$_SESSION["var_ID_country"]."

ie
"`ID_owner`='" .$_SESSION["var_ID_country"]."' AND `archive_flag`='N'"
Give that a shot. It will be a syntax error thing most likely.