Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trying to make a new report and getting 1146 error


pafranklin

Recommended Posts

Hi there,

 

I downloaded the Mailing List contrib and it works great (using a table in my database called "maillist" to capture names and email addresses for customers wanting a newsletter but not wanting to create an accout at the time.

 

However in my admin area I am trying to build a report that shows who has signed up for this Newsletter. I have used as a basis the stats_customers.php file as a starting place and the codes is below. The trouble is I now get a 1146 error (also below).

 

Please could someone be kind enough to suggest how I can fix this and where I am going wrong?

Thank................. :'(

 

<?php
 if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = $HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;

 $customers_query_raw = "SELECT customers_firstname, customers_lastname, customers_email_address from " . TABLE_MAILLIST . 

 $customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows);

// fix counted customers
 $customers_query_numrows = tep_db_query("select customers_email_address from " . TABLE_MAILLIST. " group by customers_lastname");
 $customers_query_numrows = tep_db_num_rows($customers_query_numrows);

 $rows = 0;
 $customers_query = tep_db_query($customers_query_raw);
 while ($customers = tep_db_fetch_array($customers_query)) {
$rows++;

if (strlen($rows) < 2) {
  $rows = '0' . $rows;
}
?>
		  <tr class="dataTableRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_CUSTOMERS, 'search=' . $customers['customers_lastname'], 'NONSSL'); ?>'">
			<td class="dataTableContent"><?php echo $rows; ?>.</td>
			<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, 'search=' . $customers['customers_lastname'], 'NONSSL') . '">' . $customers['customers_firstname'] . ' ' . $customers['customers_lastname'] . $customers['customers_email_address'] .'</a>'; ?> </td>

			</tr>

 

The error is: -

1146 - Table 'db*******.maillistObject' doesn't exist

 

SELECT customers_firstname, customers_lastname, customers_email_address from maillistObject

 

[TEP STOP]

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...