so about the above error, seems that this line of code is causing the error, can you help me write it in a way that isn't screwy for the sql syntax?
$next_product_query = "select products.products_id from " . TABLE_PRODUCTS . " , " . TABLE_PRODUCTS_TO_CATEGORIES . " where products.products_status = '1' and products.products_id > '" . (int)$HTTP_GET_VARS['products_id'] . "' and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = $next_product_category ";
$next_product_result = tep_db_query($next_product_query);
$next_product_array = tep_db_fetch_array($next_product_result);
if($next_product_array['products_id'] > 0){
$next_product_id = $next_product_array['products_id'];
$next_button = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $next_product_id) . '">' . tep_image(DIR_WS_IMAGES . 'nextprod.gif') . '</a>';
}else{
$next_button = '';
also, about using the customers firstname instead of id, can somehow this code from product_info be used the way it calls for the first name?
// send email notify about higher bid than the other customer's bid who won
$sql_customer = 'select customers_lastname, customers_firstname, customers_email_address from '. TABLE_CUSTOMERS." c,". TABLE_AUCTIONS_BIDS." ab where c.customers_id=ab.customers_id and ab.auctions_id= '$auction_id' and ab.bid_price<".(int)$bid_price."";$acustomer_query = tep_db_query($sql_customer);
while ($acustomer = tep_db_fetch_array($acustomer_query)) {
$acustomer_firstname = $acustomer['customer_firstname'];
$acustomer_lastname = $acustomer['customers_lastname'];
thanks much, I appreciate the time!!