Otto Posted September 24, 2005 Posted September 24, 2005 Getting the following error when using password_forgotten.php: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '=='Y'' at line 1 select customers_firstname, customers_lastname, customers_password, customers_id from customers where customers_email_address = '[email protected]' AND createaccount=='Y' [TEP STOP] Please help!
Otto Posted September 24, 2005 Author Posted September 24, 2005 If it helps, this is what's in my password_forgotten.php file itself: $check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' AND createaccount=='Y'"); if (tep_db_num_rows($check_customer_query)) { $check_customer = tep_db_fetch_array($check_customer_query); Thanks!
Guest Posted September 24, 2005 Posted September 24, 2005 what's the createaccount=='Y'?? This probably breaks the query. Does not look like a variable and if something from a global array should been through the $HTTP_GET_VARS or $HTTP_POST_VARS
Otto Posted September 25, 2005 Author Posted September 25, 2005 Found a solution to this: select customers_firstname, customers_lastname, customers_password, customers_id from customers where customers_email_address = '[email protected]' AND createaccount!='N' By the way, this was because I'm using the 'fast easy checkouit' contribution, which is what createaccount has to do with.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.