Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
afa7d736
Commit
afa7d736
authored
6 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
7f7a3ef5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Webservice_model.php
application/models/Webservice_model.php
+2
-4
No files found.
application/models/Webservice_model.php
View file @
afa7d736
...
@@ -456,8 +456,6 @@ class Webservice_model extends CI_Model {
...
@@ -456,8 +456,6 @@ class Webservice_model extends CI_Model {
foreach
(
$mechData
as
$key
=>
$value
)
{
foreach
(
$mechData
as
$key
=>
$value
)
{
$mechData
[
$key
][
'distance'
]
=
round
((
float
)
$value
[
'distance'
],
2
);
$mechData
[
$key
][
'distance'
]
=
round
((
float
)
$value
[
'distance'
],
2
);
$mechData
[
$key
][
'review'
]
=
[];
$mechData
[
$key
][
'review'
]
=
[];
$mechData
[
$key
][
'total_review'
]
=
0
;
$mechData
[
$key
][
'avg_rate'
]
=
0
;
$this
->
db
->
order_by
(
'id'
,
'DESC'
);
$this
->
db
->
order_by
(
'id'
,
'DESC'
);
$this
->
db
->
limit
(
'2'
,
'0'
);
$this
->
db
->
limit
(
'2'
,
'0'
);
...
@@ -469,8 +467,8 @@ class Webservice_model extends CI_Model {
...
@@ -469,8 +467,8 @@ class Webservice_model extends CI_Model {
FROM mechanic_rating
FROM mechanic_rating
WHERE mechanic_id='"
.
$value
[
'mechanic_id'
]
.
"'"
);
WHERE mechanic_id='"
.
$value
[
'mechanic_id'
]
.
"'"
);
if
(
!
empty
(
$rating
)
&&
!
empty
(
$rating
=
$rating
->
row_array
())){
if
(
!
empty
(
$rating
)
&&
!
empty
(
$rating
=
$rating
->
row_array
())){
$mechData
[
$key
][
'total_review'
]
=
$rating
[
'count'
]
;
$mechData
[
$key
][
'total_review'
]
=
(
empty
(
$rating
[
'count'
]))
?
'0'
:
;
$mechData
[
$key
][
'avg_rate'
]
=
$rating
[
'rating'
];
$mechData
[
$key
][
'avg_rate'
]
=
(
empty
(
$rating
[
'rating'
]))
?
0
:
(
int
)
$rating
[
'rating'
];
}
}
}
}
if
(
$type
==
0
){
if
(
$type
==
0
){
...
...
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