3 ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
4 include_once("kyberia.inc");
5 $database=new CLASS_KYBERIA();
7 $describe=$_GET['describe'];
12 <form action
='?' method
='get'>
14 <input type
='text' name
='describe' value
='<? echo $describe;?>'>
15 <input type
='submit' value
='send'>
17 <form action
='?' method
='get'>
19 <input type
='text' name
='table' value
='<? echo $table;?>'>
21 <input type
='text' name
='where' value
='<? echo $where;?>'>
22 <input type
='submit' value
='send'>
28 if ($table) selectni($table,$where);
29 if ($describe) descni($describe);
31 function descni($tablename){
33 $q="describe $tablename";
34 $set=$database->query($q);
36 echo "<table border='1'><tr><td><b>Field</b></td><td><b>Type</b></td> <td><b>Null</b></td></tr>";
38 $field=$set->getString('Field');
40 $type=$set->getString('Type');
41 $null=$set->getString('Null');
42 echo "<tr><td>".$field."</td>";
43 echo "<td>".$type."</td>";
44 echo "<td>".$null."</td></tr>";
52 function selectni($tablename,$where){
54 $q="describe $tablename";
55 $set=$database->query($q);
57 $q2="select * from $tablename";
59 $where=StripSlashes($where);
60 $q2="select * from $tablename where $where";
63 $set2=$database->query($q2);
66 $field=$set->getString('Field');
68 $type=$set->getString('Type');
69 $null=$set->getString('Null');
71 echo "<table border='1'><tr>";
72 for($i=0;$i<count($fields);$i++
){
73 echo "<td><b>".$fields[$i]."</b></td>";
79 for($i=0;$i<count($fields);$i++
){
80 $onefield=$set2->getString($fields[$i]);
81 echo "<td>".$onefield."</td>";
This page took 0.307926 seconds and 4 git commands to generate.