So i've made a few changes to the OnSale mod to try and get it in line with php7.2 and here one I'm stuck on... I currently have
Code:
if (db_query("UPDATE xcart_onsale SET begin='$begin', end='$end', saletype='$saletype', criteria='".addslashes(serialize($product_criteria))."', coupon_code='$coupon_code', uses='$times_to_use', home_display='$home_display', onsale_product_display='$onsale_product_display', onsale_display='$onsale_display', per_customer='$per_customer', productids='$productids', catids='$catids', provider='$login', status='".mysqli_real_escape_string($sale_status)."' WHERE onsaleid='$edit_update'")){
and get the error
Quote:
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /home/keyston1/public_html.dev/admin/onsale.php on line 677
|
Apparently I need to add the connection to the db in the mysqli function part
Code:
.mysqli_real_escape_string($my_connection,$sale_status)
I'm not sure what $my_connection should actually say...?
and am I headed in the right direction?
Thanks.