When installing on a fresh install of RC2a, the following errors occur in admin section:
errors on admin/coupon_admin.php
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /gearupaz/public_html/admin/includes/functions/database.php on line 107
errors on admin/gv_mail.php:
Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /gearupaz/public_html/admin/includes/functions/database.php on line 117
Warning: Cannot modify header information - headers already sent by (output started at /gearupaz/public_html/admin/includes/functions/database.php:117) in /gearupaz/public_html/admin/includes/functions/general.php on line 22
This is a fix for the CCGV (Contibution 282) where certain database.php errors and other problems are happening with the admin side.
This is a full package for new installation, where the previous package caused some problems for new (drop-in) installations.
*Built onto version 5.21
*Credit for these solutions goes to original contributors and forum users.
Fix gv_mail.php error:
On line 64 replace:
$insert_id = tep_db_insert_id($insert_query);
with:
$insert_id = tep_db_insert_id();
Fix coupon_admin.php (under case: voucherreport, lines:227-230)
replace:
$cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
$cc_query_numrows = tep_db_num_rows($cc_query);
$cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
$cc_query = tep_db_query($cc_query_raw);
with:
$cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
$cc_query = tep_db_query($cc_query_raw);
$cc_query_numrows = tep_db_num_rows($cc_query);
$cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
*Thanks OSC community for all efforts and making one of the most practical contributions a possibility.
More...




LinkBack URL
About LinkBacks









Bookmarks