Quantcast
Viewing latest article 27
Browse Latest Browse All 44

Answer by user3040610 for Page count function

Get the results and check whether it has records.

  // Check to see if record exists    $sql = "SELECT * FROM page_tracking where name ="index.php"";    $query = mysqli_query ($conn, $sql);    $result=mysqli_fetch_all($query,MYSQLI_ASSOC);    if (count($result) > 0) {        $sql= "UPDATE page_tracking SET count=count+1 where name="index.php")";    }    else {    //Insert Query    $sql = "INSERT INTO page_tracking (name, count)    VALUES ('index.php', '1')";     }

Viewing latest article 27
Browse Latest Browse All 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>