0

此更新到期和会员资格有什么问题?

      $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 );
4

1 回答 1

2

您的mysql_query 参数错误,因此不支持多个查询,请更改

$retval = mysql_query( $sqlz, $sql, $conn );

$retval = mysql_query($sql, $conn );

您需要mysql_query单独为每个查询运行

于 2013-01-17T03:30:59.860 回答