datatable - rowcss / pageoption / title for long text. mysql auto free connection

This commit is contained in:
2023-10-19 14:04:55 +07:00
parent 6a8c3097ce
commit cdba0a887e
3 changed files with 37 additions and 45 deletions
+3 -3
View File
@@ -6,9 +6,9 @@
Desc. : v4 - Class database MySQL / MariaDB
Created By : Siau Pheng ([email protected]).
Created Date : February 2nd, 2007.
Last Modified : May 8th, 2021.
Last Modified : October 19th, 2023.
(c) 2008 - 2021, 3FONIA Software; WWW.3FONIA.COM.
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
@@ -22,7 +22,7 @@ final class MySQL {
private $rec = array();
private $row = 0;
private $halt_on_error = 1; //1: halt w message, 2: not halt w message, 3: not halt no message
private $auto_free = 0; //1: free query automatically, 0: must call free method to free query
private $auto_free = 1; //1: free query automatically, 0: must call free method to free query
private $db_config = null;
private $err_num = 0;
private $err_msg = '';
+3 -4
View File
@@ -6,7 +6,7 @@
Desc. : v4 - HTML Table (jQuery & Bootstrap)
Created By : Siau Pheng ([email protected]).
Created Date : January 16th, 2008.
Last Modified : October 17th, 2023.
Last Modified : October 19th, 2023.
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
@@ -252,13 +252,12 @@ final class Table {
$t_order = ($i_order[0]['dir']=="asc") ? "ASC" : "DESC";
$i_order = $i_order[0]['column'];
}
if (($i_length > $record) || (($i_start+1) >= $record)) $i_length = -1;
if (($i_length > $record) || ($i_start >= $record) || ($record <= 10)) $i_length = -1;
$sql_limit = ($i_start>=0 && $i_length != -1) ? " LIMIT ".$i_start.", ".$i_length : "";
$sql_order = ($this->__afield[$i_order]) ? " ORDER BY ".$this->__afield[$i_order]." ".$t_order : "";
$adata['data'] = [];
$adata['data'] = [];
$this->__cdb->Query("SELECT ".$this->__tfield." FROM ".$this->__ttable.$this->__twhere.$sql_order.$sql_limit);
//$adata['sql'] = "SELECT ".$this->__tfield." FROM ".$this->__ttable.$this->__twhere.$sql_order.$sql_limit;
while ($this->__cdb->Next()) {
$abaris = [];
$aoption = ['button'=>[]];