<?php
include "KEDA.class.php";
$table="news";
$time=time();
$subject="test".$time;
$content="content of test ".$time;
//to insert row:
$insert=KEDA::Insert($table," (subject,content,date) values('$subject','$content','$time') ");
if($insert) echo "Row inserted. \n <br>"; else echo mysql_error()." \n <br> ";
//to delete
//change it frequently to see result!
$row_id=1;
$delete=KEDA::Delete($table,$row_id);
if($delete) echo "Row deleted. \n <br>"; else echo mysql_error()." \n <br> ";
//to delete
//change it frequently to see result!
$row_id=1;
$subject="test ".$time." edited";
$content="content of test ".$time." edited";
$edit=KEDA::Edit($table,$row_id," (subject,content,date) values('$subject','$content','$time') ");
if($edit) echo "Row edited. \n <br>"; else echo mysql_error()." \n <br> ";
//see edit and delete archive:
$row_id=1;
echo "Delete Archive : \n <br>";
var_dump(KEDA::GetDeleteArchive($table));
echo "Edit Archive : \n <br>";
var_dump(KEDA::GetEditArchiveData($table,$row_id));
//select data from db:
echo "Selected Data : \n <br>";
var_dump(KEDA::Select($table));
|