此更新过期和成员资格有什么问题?
$unit = "Days";
$length = "1";
$newExpire = strtotime("+{$length} {$unit}");
$sqlz = "UPDATE users SET expire ='$newExpire' WHERE username ='{$_POST['custom']}'";
$sql = "UPDATE users SET membership ='14' WHERE username ='{$_POST['custom']}'";
$retval = mysql_query( $sqlz, $sql, $conn );
答案 0 :(得分:2)
您的mysql_query参数错误,不支持多个查询,因此请更改
$retval = mysql_query( $sqlz, $sql, $conn );
到
$retval = mysql_query($sql, $conn );
您需要为每个查询分别运行mysql_query