Skip to content

Commit 99892e3

Browse files
authored
3.20
-remove php version check -increase general font size -reorder fix null value
1 parent f6e5cee commit 99892e3

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

sql.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
error_reporting(E_ALL);
3-
if(version_compare(PHP_VERSION,'5.4.0','<')) die('Require PHP 5.4 or higher');
43
if(!extension_loaded('mysqli') && !extension_loaded('pdo_mysql')) die('Install mysqli or pdo_mysql extension!');
54
session_name('SQL');
65
session_start();
76
$bg=2;
87
$step=20;
9-
$version="3.19";
8+
$version="3.20";
109
$bbs=['False','True'];
1110
$deny=['mysql','information_schema','performance_schema','sys'];
1211
$js=(file_exists('jquery.js')?"/jquery.js":"https://code.jquery.com/jquery-1.12.4.min.js");
@@ -56,8 +55,7 @@ public function query($sql) {
5655
public function begin() {
5756
if($this->dbty==self::$sqltype[0]) {
5857
$this->_cnx->autocommit(FALSE);
59-
if(version_compare(PHP_VERSION,'5.5.0','<')) return $this->query("START TRANSACTION");
60-
else return $this->_cnx->begin_transaction();
58+
return $this->_cnx->begin_transaction();
6159
} else {
6260
return $this->_cnx->beginTransaction();
6361
}
@@ -605,7 +603,7 @@ public function create_ro($db,$pn) {
605603
$head='<!DOCTYPE html><html lang="en"><head>
606604
<title>EdMyAdmin</title><meta charset="utf-8">
607605
<style>
608-
*{margin:0;padding:0;font-size:12px;color:#333;font-family:Arial}
606+
*{margin:0;padding:0;font-size:14px;color:#333;font-family:Arial}
609607
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;background:#fff}
610608
html,textarea{overflow:auto}
611609
.container{overflow:auto;overflow-y:hidden;-ms-overflow-y:hidden;white-space:nowrap;scrollbar-width:thin}
@@ -1014,7 +1012,7 @@ public function create_ro($db,$pn) {
10141012
$q_co=$ed->con->query("SHOW FULL FIELDS FROM `$tb`")->fetch(1);
10151013
foreach($q_co as $k=>$r_co) {
10161014
if($ed->post('n1')==$r_co[0] && $r_co[4]!='PRI' && empty($r_co[6])) {
1017-
$ed->con->query("ALTER TABLE `$tb` MODIFY COLUMN ".$r_co[0]." ".$r_co[1]." ".(($ed->post('n2')=="x" && $q_co[0][4]!='PRI' && empty($q_co[0][6]))?"FIRST":"AFTER ".$ed->post('n2')));
1015+
$ed->con->query("ALTER TABLE `$tb` MODIFY COLUMN ".$r_co[0]." ".$r_co[1]." ".($r_co[3]=='NO'?'NOT NULL':'NULL')." ".(($ed->post('n2')=="x" && $q_co[0][4]!='PRI' && empty($q_co[0][6]))?"FIRST":"AFTER ".$ed->post('n2')));
10181016
}
10191017
}
10201018
exit;

0 commit comments

Comments
 (0)