stevennickelby Posted August 26, 2006 Posted August 26, 2006 I'm getting the following error 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 ''affiliate_affiliate where affiliate_email_address = ''' at line select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from customers where customers_email_address = 'affiliate_affiliate where affiliate_email_address = '' [TEP STOP] the script that it realtes to is... $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . TABLE_AFFILIATE . " where affiliate_email_address = '" . tep_db_input($email_address) . "'"); if (!tep_db_num_rows($check_customer_query)) { $error = true; } else { $check_customer = tep_db_fetch_array($check_customer_query); can customers_email_address, and affiliate_email_address be used for ($email_address) ??? Quote
guntersammet Posted August 26, 2006 Posted August 26, 2006 I'm getting the following error 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 ''affiliate_affiliate where affiliate_email_address = ''' at line select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from customers where customers_email_address = 'affiliate_affiliate where affiliate_email_address = '' [TEP STOP] the script that it realtes to is... $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . TABLE_AFFILIATE . " where affiliate_email_address = '" . tep_db_input($email_address) . "'"); if (!tep_db_num_rows($check_customer_query)) { $error = true; } else { $check_customer = tep_db_fetch_array($check_customer_query); can customers_email_address, and affiliate_email_address be used for ($email_address) ??? You can't have 2 where clauses. Not sure if this has been caused by adding a contribution but you might want to try the following: $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . " and affiliate_email_address = '" . tep_db_input($email_address) . "'"); In this case you will need an email address in the $email_address variable and affiliate_email_address needs to be a column in the customers table AND both email fields need to have the same email address in it. HTH Gunter Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.