Hi,
Are you allowed to follow UPDATE with SELECT as the UPDATE works OK, but I can not extract the info in pur_credit field, data is in the db though or is my code wrong?
<code>
$query = "UPDATE AUCTION_purchcredit
SET ver_date = '$VERIFIEDATE',
pp_verified = 'y',
flag='n'
WHERE user_id='".$_SESSION["AUCTION_LOGGED_IN"]."'
ORDER BY id DESC LIMIT 1";
$res = mysql_query($query);
if(!$res) {
MySQLError($query);
exit;
}
//get amount of credit purchased
$query = "SELECT pur_credit FROM AUCTION_purchcredit
WHERE user_id = '".$_SESSION["AUCTION_LOGGED_IN"]."' AND flag='n'";
$res = mysql_query($query);
if(!$res) {
MySQLError($query);
exit;
}
$credit_purchased = $res;
</code>
Cheers in anticipation..
John
Are you allowed to follow UPDATE with SELECT as the UPDATE works OK, but I can not extract the info in pur_credit field, data is in the db though or is my code wrong?
<code>
$query = "UPDATE AUCTION_purchcredit
SET ver_date = '$VERIFIEDATE',
pp_verified = 'y',
flag='n'
WHERE user_id='".$_SESSION["AUCTION_LOGGED_IN"]."'
ORDER BY id DESC LIMIT 1";
$res = mysql_query($query);
if(!$res) {
MySQLError($query);
exit;
}
//get amount of credit purchased
$query = "SELECT pur_credit FROM AUCTION_purchcredit
WHERE user_id = '".$_SESSION["AUCTION_LOGGED_IN"]."' AND flag='n'";
$res = mysql_query($query);
if(!$res) {
MySQLError($query);
exit;
}
$credit_purchased = $res;
</code>
Cheers in anticipation..
John