Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vmusicchart-cms
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
vmusicchart-cms
Commits
f0d8c083
You need to sign in or sign up before continuing.
Commit
f0d8c083
authored
Jan 11, 2021
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
customize model của CI_Model
parent
42b6fd72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
MY_Model.php
application/core/MY_Model.php
+26
-0
No files found.
application/core/MY_Model.php
0 → 100644
View file @
f0d8c083
<?php
defined
(
'BASEPATH'
)
or
exit
(
'No direct script access allowed'
);
class
MY_Model
extends
CI_Model
{
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* Hàm ghi ra log php câu lệnh SQL để debug
*
* @param null $action_name
* @param bool $flag
*/
public
function
sql_log
(
$action_name
=
null
,
$flag
=
true
)
{
if
(
$flag
)
{
if
(
empty
(
$action_name
))
{
$action_name
=
date
(
'Y-m-d H:i:s'
);
}
error_log
(
'['
.
$action_name
.
'] SQL: '
.
$this
->
db
->
last_query
());
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment