Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

customers_info query


YePix

Recommended Posts

Hello everyone. What's wrong with this query? I get the date for account creation but all other queries remain empty. Can someone help me there ?
$customers_info_query = tep_db_query("select ci.customers_id as customers_info_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_account_last_modified from " . TABLE_CUSTOMERS . " ci, " . TABLE_CUSTOMERS_INFO . " where customers_id = '" . (int)$customer_id . "'");
$customers_info = tep_db_fetch_array($customers_info_query);
<?php echo '<h3>' . CATEGORY_SITEINFO . '</h3>' .
ENTRY_TEXT_ACCOUNT_CREATED . '&nbsp;' . tep_date_short ($customers_info['customers_info_date_account_created']) . $separator .
ENTRY_TEXT_AGREED_CONDITIONS . '&nbsp;' . $customers_info['customers_info_date_account_created'] . $separator .
ENTRY_TEXT_LAST_LOGIN . '&nbsp;' . tep_date_short ($customers_info['customers_info_date_of_last_logon']) . $separator .
ENTRY_TEXT_LOGIN_TOTAL . '&nbsp;' . $customers_info['customers_info_number_of_logons'] . $separator .
'';?>

 

Link to comment
Share on other sites

38 minutes ago, Yepi said:

from " . TABLE_CUSTOMERS . " ci, " . TABLE_CUSTOMERS_INFO . "

look closely...........
" . TABLE_CUSTOMERS . " ci, " . (where ci could 99,(% be refered to TABLE_CUSTOMERS_INFO)

i would go for more logic:
 

Quote

from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci,



 

 

Link to comment
Share on other sites

42 minutes ago, Yepi said:

where customers_id = '" . (int)$customer_id . "'"

wich customers_id?
the one from c.customers_id
or
ci.customers_id

Might even a customer id from another planet.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...