Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

sopham / todolist

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • todolist
  • delete-all.php
Find file
BlameHistoryPermalink
  • sopham's avatar
    comment, delete unnescessary code · 142cce75
    sopham committed 6 years ago
    142cce75
delete-all.php 343 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php

//include database connection data
include_once "dbconnection.php";

//make a query
$query = "TRUNCATE TABLE toDoList;";

//perform the query on the database
$result = $link -> query($query);

//check if there is any task deleted
if($result->num_rows <= 0) {
  echo "No task was deleted";
}

//close the connection
$link -> close();
?>