Hello,
I know nothing about PHP and this error has come up and I've been researching for days and have tried just about everything. Hopefully, I've given you enough information, but can you tell me why this line:
$row2 = mysql_fetch_assoc($res);
is the one called up in the following error?
''Error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource... ''
function wl_cart_transfer(){
global $OPTION,$customerArea;
$table = is_dbtable_there('wishlist');
$wid = (int) trim($_POST['transfer_wl_item']); //change.9.9
$qStr = "SELECT * FROM $table WHERE wid = $wid LIMIT 0,1";
$res = mysql_query($qStr);
$row = mysql_fetch_assoc($res);
$extraSQL = $this->attributesExtraSql($row);
$table = is_dbtable_there('inventory');
$itemID = trim($row['item_id']);
$qStr = "SELECT amount FROM $table WHERE $extraSQL ID_item = '$itemID' LIMIT 0,1";
$res = mysql_query($qStr);
$row2 = mysql_fetch_assoc($res);
$stock = (int) $row2['amount'];
if($OPTION['wps_track_inventory'] == 'not_active'){
$stock = 100000;
}
else {
$table = is_dbtable_there('inventory');
$itemID = trim($row['item_id']);
$qStr = "SELECT amount FROM $table WHERE $extraSQL ID_item = '$itemID' LIMIT 0,1";
$res = mysql_query($qStr);
$row2 = mysql_fetch_assoc($res);
$stock = (int) $row2['amount'];
}
Thanks in advance.