到期日期和成员资格查询

时间:2013-01-17 03:27:00

标签: php sql

此更新过期和成员资格有什么问题?

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

1 个答案:

答案 0 :(得分:2)

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

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

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

您需要为每个查询分别运行mysql_query