@@ -25,7 +25,7 @@ class MySQLPDOBaseModel
2525{
2626 use Support;
2727
28- const VERSION = '3.0.3 ' ;
28+ const VERSION = '3.0.6 ' ;
2929 const LAST_MODIFIED = '2022-06-18 ' ;
3030 const AUTHOR_NAME = 'Hung Nguyen ' ;
3131 const AUTHOR_EMAIL = 'dev@nguyenanhung.com ' ;
@@ -419,15 +419,15 @@ public function checkExistsWithMultipleWhere($whereValue = '', string $whereFiel
419419 *
420420 * Mặc định giá trị so sánh dựa trên column created_at
421421 *
422- * @param array $selectField Danh sách các column cần lấy
423- * @param string $byColumn Column cần so sánh dữ liệu, mặc định sẽ sử dụng column created_at
422+ * @param string| array $selectField Danh sách các column cần lấy
423+ * @param string $byColumn Column cần so sánh dữ liệu, mặc định sẽ sử dụng column created_at
424424 *
425425 * @return mixed
426426 * @author : 713uk13m <dev@nguyenanhung.com>
427427 * @copyright: 713uk13m <dev@nguyenanhung.com>
428428 * @time : 10/09/2020 53:20
429429 */
430- public function getLatest (array $ selectField = array ('* ' ), string $ byColumn = 'created_at ' )
430+ public function getLatest ($ selectField = array ('* ' ), string $ byColumn = 'created_at ' )
431431 {
432432 $ this ->connection ();
433433 if (!is_array ($ selectField )) {
@@ -443,7 +443,7 @@ public function getLatest(array $selectField = array('*'), string $byColumn = 'c
443443 /**
444444 * Function getLatestByColumn - Hàm lấy bản ghi mới nhất theo điều kiện sâu hơn
445445 *
446- * @param array $wheres
446+ * @param string| array $wheres
447447 * @param string|array $selectField
448448 * @param string $column
449449 * @param string $fields
@@ -453,7 +453,7 @@ public function getLatest(array $selectField = array('*'), string $byColumn = 'c
453453 * @copyright: 713uk13m <dev@nguyenanhung.com>
454454 * @time : 10/06/2022 28:55
455455 */
456- public function getLatestByColumn (array $ wheres = array (), $ selectField = '* ' , string $ column = 'id ' , string $ fields = 'id ' )
456+ public function getLatestByColumn ($ wheres = array (), $ selectField = '* ' , string $ column = 'id ' , string $ fields = 'id ' )
457457 {
458458 $ this ->connection ();
459459 if (!is_array ($ selectField )) {
@@ -486,15 +486,15 @@ public function getLatestByColumn(array $wheres = array(), $selectField = '*', s
486486 *
487487 * Mặc định giá trị so sánh dựa trên column created_at
488488 *
489- * @param array $selectField Danh sách các column cần lấy
490- * @param string $byColumn Column cần so sánh dữ liệu, mặc định sẽ sử dụng column created_at
489+ * @param string| array $selectField Danh sách các column cần lấy
490+ * @param string $byColumn Column cần so sánh dữ liệu, mặc định sẽ sử dụng column created_at
491491 *
492492 * @return mixed
493493 * @author : 713uk13m <dev@nguyenanhung.com>
494494 * @copyright: 713uk13m <dev@nguyenanhung.com>
495495 * @time : 10/09/2020 54:15
496496 */
497- public function getOldest (array $ selectField = array ('* ' ), string $ byColumn = 'created_at ' )
497+ public function getOldest ($ selectField = array ('* ' ), string $ byColumn = 'created_at ' )
498498 {
499499 $ this ->connection ();
500500 if (!is_array ($ selectField )) {
@@ -511,7 +511,7 @@ public function getOldest(array $selectField = array('*'), string $byColumn = 'c
511511 /**
512512 * Function getOldestByColumn - Hàm lấy bản ghi cũ nhất theo điều kiện sâu hơn
513513 *
514- * @param array $wheres
514+ * @param string| array $wheres
515515 * @param string|array $selectField
516516 * @param string $column
517517 * @param string $fields
@@ -521,7 +521,7 @@ public function getOldest(array $selectField = array('*'), string $byColumn = 'c
521521 * @copyright: 713uk13m <dev@nguyenanhung.com>
522522 * @time : 10/06/2022 28:55
523523 */
524- public function getOldestByColumn (array $ wheres = array (), $ selectField = '* ' , string $ column = 'id ' , string $ fields = 'id ' )
524+ public function getOldestByColumn ($ wheres = array (), $ selectField = '* ' , string $ column = 'id ' , string $ fields = 'id ' )
525525 {
526526 $ this ->connection ();
527527 if (!is_array ($ selectField )) {
@@ -793,7 +793,7 @@ public function getResultDistinct(string $selectField = ''): array
793793 /**
794794 * Function getResult
795795 *
796- * @param array $wheres
796+ * @param string| array $wheres
797797 * @param string|array $selectField
798798 * @param null $options
799799 *
@@ -802,7 +802,7 @@ public function getResultDistinct(string $selectField = ''): array
802802 * @copyright: 713uk13m <dev@nguyenanhung.com>
803803 * @time : 10/09/2020 59:54
804804 */
805- public function getResult (array $ wheres = array (), $ selectField = '* ' , $ options = null ): array
805+ public function getResult ($ wheres = array (), $ selectField = '* ' , $ options = null ): array
806806 {
807807 $ this ->connection ();
808808 if (!is_array ($ selectField )) {
@@ -842,7 +842,7 @@ public function getResult(array $wheres = array(), $selectField = '*', $options
842842 /**
843843 * Function getResultWithMultipleWhere
844844 *
845- * @param array $wheres
845+ * @param string| array $wheres
846846 * @param string|array $selectField
847847 * @param null $options
848848 *
@@ -851,7 +851,7 @@ public function getResult(array $wheres = array(), $selectField = '*', $options
851851 * @copyright: 713uk13m <dev@nguyenanhung.com>
852852 * @time : 10/09/2020 47:38
853853 */
854- public function getResultWithMultipleWhere (array $ wheres = array (), $ selectField = '* ' , $ options = null ): array
854+ public function getResultWithMultipleWhere ($ wheres = array (), $ selectField = '* ' , $ options = null ): array
855855 {
856856 $ this ->connection ();
857857 if (!is_array ($ selectField )) {
@@ -889,15 +889,15 @@ public function getResultWithMultipleWhere(array $wheres = array(), $selectField
889889 /**
890890 * Function countResult
891891 *
892- * @param array $wheres
892+ * @param string| array $wheres
893893 * @param string|array $selectField
894894 *
895895 * @return int
896896 * @author : 713uk13m <dev@nguyenanhung.com>
897897 * @copyright: 713uk13m <dev@nguyenanhung.com>
898898 * @time : 10/09/2020 48:26
899899 */
900- public function countResult (array $ wheres = array (), $ selectField = '* ' ): int
900+ public function countResult ($ wheres = array (), $ selectField = '* ' ): int
901901 {
902902 $ this ->connection ();
903903 if (!is_array ($ selectField )) {
@@ -943,15 +943,15 @@ public function add(array $data = array())
943943 /**
944944 * Function update
945945 *
946- * @param array $data
947- * @param array $wheres
946+ * @param array $data
947+ * @param string| array $wheres
948948 *
949949 * @return int
950950 * @author : 713uk13m <dev@nguyenanhung.com>
951951 * @copyright: 713uk13m <dev@nguyenanhung.com>
952952 * @time : 10/09/2020 50:08
953953 */
954- public function update (array $ data = array (), array $ wheres = array ()): int
954+ public function update (array $ data = array (), $ wheres = array ()): int
955955 {
956956 $ this ->connection ();
957957 $ db = $ this ->db ->update ($ data );
@@ -979,14 +979,14 @@ public function update(array $data = array(), array $wheres = array()): int
979979 /**
980980 * Function delete
981981 *
982- * @param array $wheres
982+ * @param string| array $wheres
983983 *
984984 * @return int
985985 * @author : 713uk13m <dev@nguyenanhung.com>
986986 * @copyright: 713uk13m <dev@nguyenanhung.com>
987987 * @time : 10/09/2020 50:03
988988 */
989- public function delete (array $ wheres = array ()): int
989+ public function delete ($ wheres = array ()): int
990990 {
991991 $ this ->connection ();
992992 $ db = $ this ->db ->delete ($ this ->table );
0 commit comments