YePix Posted July 27, 2018 Share Posted July 27, 2018 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 . ' ' . tep_date_short ($customers_info['customers_info_date_account_created']) . $separator . ENTRY_TEXT_AGREED_CONDITIONS . ' ' . $customers_info['customers_info_date_account_created'] . $separator . ENTRY_TEXT_LAST_LOGIN . ' ' . tep_date_short ($customers_info['customers_info_date_of_last_logon']) . $separator . ENTRY_TEXT_LOGIN_TOTAL . ' ' . $customers_info['customers_info_number_of_logons'] . $separator . '';?> Link to comment Share on other sites More sharing options...
oscMarket Posted July 27, 2018 Share Posted July 27, 2018 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 More sharing options...
oscMarket Posted July 27, 2018 Share Posted July 27, 2018 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 More sharing options...
YePix Posted July 27, 2018 Author Share Posted July 27, 2018 Thank you :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.