Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

split_page_results.php


Code Red

Recommended Posts

Posted

I've been trying to run a copy of the file catalog/admin/customers.php in the front end of the site (catalog/customers.php) so it can be publically viewable, but I'm getting an SQL 1064 error. After a bit of head scratching I've isolated the problem to where it calls the splitPageResults function - looking at catalog/admin/includes/classes/split_page_results.php and catalog/includes/classes/split_page_results.php they seem to have been written by two different people - the code is very different and the order that the variables are passed to the function are different too.

 

This is the line in customers.php -

 

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

 

 

which matches with the function in catalog/admin/includes/classes/split_page_results.php -

 

function splitPageResultsDealers(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows)

 

 

However, now that I've copied customers.php in the catalog/ folder, it's calling the function in catalog/includes/classes/split_page_results.php -

 

function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page')

 

 

It's obvious that &$sql_query is $query and $max_rows_per_page is $max_rows, but the other two are giving me trouble - I've tried changing around the variable order from the function call in customers.php but instead of the syntax error I just get a big blank. I even tried cheating, copying the admin version of split_page_results.php, renaming all the functions and calling that, but that didn't work either.

 

Can anyone give me some help?

Posted
See the latest oscommerce update package for a fix.

 

Jack

 

Can I just copy the necessary files over or will it need a full re-install? I've quite heavily modified the site.

Archived

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

×
×
  • Create New...