-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeleteall.php
More file actions
45 lines (30 loc) · 734 Bytes
/
deleteall.php
File metadata and controls
45 lines (30 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
include_once("init.php");
$file=$_POST['data'];
if($file=="viewsales")
{
$tablename='stock_sales';
}
else if($file=="viewcustomers")
{
$tablename='customer_details';
}
else if($file=="viewpurchase")
{
$tablename='stock_entries';
}
else if($file=="viewsupplier")
{
$tablename='supplier_details';
}
else if($file=="viewproduct")
{
$tablename='stock_details';
}
//$db->execute("INSERT INTO stock_sales(transactionid)VALUES('$tablename')");
//$data=$_POST['data'];
//$db->execute("INSERT INTO stock_sales( transactionid)VALUES('$d')");
//$db->execute("DELETE FROM stock_sales WHERE id='$d'");
$db->execute("TRUNCATE TABLE ".$tablename);
//$db->execute("DELETE FROM stock_details WHERE id='$id'");
?>