Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - SQL syntax error in password_forgotten.php


Otto

Recommended Posts

Posted

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!

Posted

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!

Posted

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

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...