Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
IPok
IPok_Web
Commits
b0eed51c
Commit
b0eed51c
authored
7 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa'
parents
fe20e193
1502c333
master
…
anju
client
dixon
jansa
master_bak
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
Webservice_model.php
admin/application/models/Webservice_model.php
+15
-8
No files found.
admin/application/models/Webservice_model.php
View file @
b0eed51c
...
@@ -1071,14 +1071,14 @@ class Webservice_model extends CI_Model {
...
@@ -1071,14 +1071,14 @@ class Webservice_model extends CI_Model {
$where
=
'tbl_doctors.specialization ='
.
"'
$speciality
'"
;
$where
=
'tbl_doctors.specialization ='
.
"'
$speciality
'"
;
$this
->
db
->
where
(
$where
);
$this
->
db
->
where
(
$where
);
}
}
if
(
isset
(
$data
[
'date'
])
&&
strlen
(
$data
[
'date'
])){
//
if(isset($data['date']) && strlen($data['date'])){
$this
->
db
->
join
(
"tbl_doctor_leave"
,
"tbl_doctors.id = tbl_doctor_leave.doctor_id and tbl_clinic_doctors.clinic_id = tbl_doctor_leave.clinic_id"
,
"LEFT"
);
//
$this->db->join("tbl_doctor_leave","tbl_doctors.id = tbl_doctor_leave.doctor_id and tbl_clinic_doctors.clinic_id = tbl_doctor_leave.clinic_id","LEFT");
$date
=
$data
[
"date"
];
//
$date = $data["date"];
$this
->
db
->
where
(
"(tbl_doctor_leave.start_date IS NULL or (
$date
<tbl_doctor_leave.start_date OR
$date
>tbl_doctor_leave.end_date))"
);
//
$this->db->where("(tbl_doctor_leave.start_date IS NULL or ($date<tbl_doctor_leave.start_date OR $date>tbl_doctor_leave.end_date))");
//$new_where = "(select count(*) from tbl_doctor_leave where ($date > tbl_doctor_leave.start_date OR $date < tbl_doctor_leave.end_date)) =". 0;
//
//$new_where = "(select count(*) from tbl_doctor_leave where ($date > tbl_doctor_leave.start_date OR $date < tbl_doctor_leave.end_date)) =". 0;
//$this->db->where($new_where);
//
//$this->db->where($new_where);
//$this->db->or_where($or_where);
//
//
$this->db->or_where($or_where);
}
//
}
if
(
isset
(
$data
[
'others'
])
&&
strlen
(
$data
[
'others'
])){
if
(
isset
(
$data
[
'others'
])
&&
strlen
(
$data
[
'others'
])){
if
(
$data
[
'others'
]
==
'MEN'
||
$data
[
'others'
]
==
'WOMEN'
){
if
(
$data
[
'others'
]
==
'MEN'
||
$data
[
'others'
]
==
'WOMEN'
){
if
(
$data
[
'others'
]
==
'MEN'
){
if
(
$data
[
'others'
]
==
'MEN'
){
...
@@ -1129,6 +1129,13 @@ class Webservice_model extends CI_Model {
...
@@ -1129,6 +1129,13 @@ class Webservice_model extends CI_Model {
//echo $this->db->last_query();exit();
//echo $this->db->last_query();exit();
//print_r($this->db->last_query());die();
//print_r($this->db->last_query());die();
if
(
$query
->
num_rows
()
>
0
)
{
if
(
$query
->
num_rows
()
>
0
)
{
if
(
isset
(
$data
[
'date'
])
&&
strlen
(
$data
[
'date'
])){
$date
=
$data
[
'date'
];
$where
=
'$date<tbl_doctor_leave.start_date OR $date>tbl_doctor_leave.end_date'
;
$this
->
db
->
where
(
$where
);
$leave_query
=
$this
->
db
->
get
(
'tbl_doctor_leave'
)
->
result
();
print_r
(
$leave_query
);
exit
();
}
$return_array
=
array
(
'status'
=>
'success'
,
'data'
=>
$query
->
result_array
());
$return_array
=
array
(
'status'
=>
'success'
,
'data'
=>
$query
->
result_array
());
}
}
else
{
else
{
...
...
This diff is collapsed.
Click to expand it.
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