update_popularity.php 313 B

1234567891011121314
  1. <?php
  2. if (isset($_GET['api_id'])) {
  3. include("connectSQL_Component.php");
  4. $api_id = $_GET['api_id'];
  5. $update_type = $_GET['update_type'];
  6. $sql = "UPDATE [BIMComponents].[dbo].[API_Table] SET $update_type += 1 WHERE [id] = $api_id;";
  7. $fetchResult = sqlsrv_query($conn, $sql);
  8. } else {
  9. die("post error!");
  10. }