Added action fieldlist
This commit is contained in:
parent
c2623224cd
commit
46760ff750
8
c.php
8
c.php
@ -78,8 +78,7 @@
|
||||
}
|
||||
|
||||
function fieldList($table){
|
||||
$query = "SELECT * FROM `$table` LIMIT 0,1";
|
||||
$result_id = mysql_query($query);
|
||||
$result_id = mysql_list_fields($this->database, $table);
|
||||
|
||||
$numOfCols = mysql_num_fields($result_id);
|
||||
for($i=0;$i<$numOfCols;$i++)
|
||||
@ -122,6 +121,11 @@
|
||||
$con->connect();
|
||||
echo json_encode($con->dbList());
|
||||
break;
|
||||
case "fieldlist":
|
||||
$con->connect();
|
||||
$con->selectDb($database);
|
||||
echo json_encode($con->fieldList($table));
|
||||
break;
|
||||
case "query":
|
||||
$con->connect();
|
||||
$con->query($query);
|
||||
|
Loading…
Reference in New Issue
Block a user