I have tried everything now and here is as far as i have got:
//variables
$idQuery = "SELECT member_id FROM customer WHERE username = '$userName'";
$recordSet = $db->Execute($idQuery);
$userID = $recordSet->fields['0'];
$mediaID = $_GET["mediaid"];
$totalQuery = "SELECT * FROM cart WHERE stock_id = '$mediaID'";
$totalResults = $db->Execute($totalQuery);
echo "Count 1: " . $totalResults->recordcount();
$checkQuery = "SELECT cart.member_id, cart.Res_date, cart.Stock_id FROM cart WHERE cart.member_id ='$userID' AND cart.Stock_id='$mediaID'";
$result_obj = $db->Execute($checkQuery);
echo "Count 2: " . $result_obj->recordcount();
And this is the output:
Count 1: 1
Fatal error: Call to a member function on a non-object in C:\Program Files\Apache Group\Apache2\htdocs\cart.php on line 54
(line 54 is ------ echo "Count 2: " . $result_obj->recordcount()😉
The first count is right as it shows there is 1 item of a partiulcar item number in.
The only thing i can thinkof is that the query is not correct. I have tried every combination. Can someone tell me if it looks ok?
Thanks
[/b]