3 ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
4 include_once("kyberia.inc");
5 $database=new CLASS_KYBERIA();
7 <form action
='?' method
='get'>
9 <input type
='text' name
='describe'>
10 <input type
='submit' value
='send'>
12 <form action
='?' method
='get'>
14 <input type
='text' name
='table'>
16 <input type
='text' name
='where'>
17 <input type
='submit' value
='send'>
22 $describe=$_GET['describe'];
23 $table=$_GET['table'];
24 $where=$_GET['where'];
26 if ($table) selectni($table,$where);
27 if ($describe) descni($describe);
29 function descni($tablename){
31 $q="describe $tablename";
32 $set=$database->query($q);
34 echo "<table border='1'><tr><td><b>Field</b></td><td><b>Type</b></td> <td><b>Null</b></td></tr>";
36 $field=$set->getString('Field');
38 $type=$set->getString('Type');
39 $null=$set->getString('Null');
40 echo "<tr><td>".$field."</td>";
41 echo "<td>".$type."</td>";
42 echo "<td>".$null."</td></tr>";
50 function selectni($tablename,$where){
52 $q="describe $tablename";
53 $set=$database->query($q);
55 $q2="select * from $tablename";
57 $q2="select * from $tablename where $where";
60 $set2=$database->query($q2);
63 $field=$set->getString('Field');
65 $type=$set->getString('Type');
66 $null=$set->getString('Null');
68 for($i=0;$i<count($fields);$i++
){
69 echo "|:|<b>".$fields[$i]."</b>";
75 for($i=0;$i<count($fields);$i++
){
76 $onefield=$set2->getString($fields[$i]);
This page took 0.317622 seconds and 4 git commands to generate.