How to get the values in between the range by using where clause
Database StructureI am trying raw query in an controller(Codeigniter) and i am trying to get the values from the range provided by the user on newDate and newDate2..My problem is it displays nothing..How do i write the query for this..I just want to display the qty,productname,bundle according to the voucherno(vno)...Here is my tried code
Controller Code:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$date = str_replace('/', '-', $startdate);
$newDate = date("Y-m-d", strtotime($date));
$date2 = str_replace('/', '-', $enddate);
$newDate2 = date("Y-m-d", strtotime($date2));
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "$newDate"AND billdate <= "$newDate2" ORDER by `vno`')->result_array();
$data['query'] = $query;
View Code:
<?php foreach ($query as $row): ?>
<tr><td></td><td></td><td></td><td></td>
<td><?=$row['Prdtname'];?></td>
<td><?=$row['Qty'];?></td>
<td><?=$row['bundle'];?></td>
<?php endforeach ?>
php mysql codeigniter select
|
show 5 more comments
Database StructureI am trying raw query in an controller(Codeigniter) and i am trying to get the values from the range provided by the user on newDate and newDate2..My problem is it displays nothing..How do i write the query for this..I just want to display the qty,productname,bundle according to the voucherno(vno)...Here is my tried code
Controller Code:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$date = str_replace('/', '-', $startdate);
$newDate = date("Y-m-d", strtotime($date));
$date2 = str_replace('/', '-', $enddate);
$newDate2 = date("Y-m-d", strtotime($date2));
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "$newDate"AND billdate <= "$newDate2" ORDER by `vno`')->result_array();
$data['query'] = $query;
View Code:
<?php foreach ($query as $row): ?>
<tr><td></td><td></td><td></td><td></td>
<td><?=$row['Prdtname'];?></td>
<td><?=$row['Qty'];?></td>
<td><?=$row['bundle'];?></td>
<?php endforeach ?>
php mysql codeigniter select
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Eva i just store the date only
– dhara
Nov 20 at 7:05
Can you show the actual dates your using (both from the database and the ones in$newDate
) as well as the datatype of the database values.
– Nigel Ren
Nov 20 at 7:08
|
show 5 more comments
Database StructureI am trying raw query in an controller(Codeigniter) and i am trying to get the values from the range provided by the user on newDate and newDate2..My problem is it displays nothing..How do i write the query for this..I just want to display the qty,productname,bundle according to the voucherno(vno)...Here is my tried code
Controller Code:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$date = str_replace('/', '-', $startdate);
$newDate = date("Y-m-d", strtotime($date));
$date2 = str_replace('/', '-', $enddate);
$newDate2 = date("Y-m-d", strtotime($date2));
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "$newDate"AND billdate <= "$newDate2" ORDER by `vno`')->result_array();
$data['query'] = $query;
View Code:
<?php foreach ($query as $row): ?>
<tr><td></td><td></td><td></td><td></td>
<td><?=$row['Prdtname'];?></td>
<td><?=$row['Qty'];?></td>
<td><?=$row['bundle'];?></td>
<?php endforeach ?>
php mysql codeigniter select
Database StructureI am trying raw query in an controller(Codeigniter) and i am trying to get the values from the range provided by the user on newDate and newDate2..My problem is it displays nothing..How do i write the query for this..I just want to display the qty,productname,bundle according to the voucherno(vno)...Here is my tried code
Controller Code:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$date = str_replace('/', '-', $startdate);
$newDate = date("Y-m-d", strtotime($date));
$date2 = str_replace('/', '-', $enddate);
$newDate2 = date("Y-m-d", strtotime($date2));
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "$newDate"AND billdate <= "$newDate2" ORDER by `vno`')->result_array();
$data['query'] = $query;
View Code:
<?php foreach ($query as $row): ?>
<tr><td></td><td></td><td></td><td></td>
<td><?=$row['Prdtname'];?></td>
<td><?=$row['Qty'];?></td>
<td><?=$row['bundle'];?></td>
<?php endforeach ?>
php mysql codeigniter select
php mysql codeigniter select
edited Nov 20 at 8:35
asked Nov 20 at 6:56
dhara
19914
19914
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Eva i just store the date only
– dhara
Nov 20 at 7:05
Can you show the actual dates your using (both from the database and the ones in$newDate
) as well as the datatype of the database values.
– Nigel Ren
Nov 20 at 7:08
|
show 5 more comments
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Eva i just store the date only
– dhara
Nov 20 at 7:05
Can you show the actual dates your using (both from the database and the ones in$newDate
) as well as the datatype of the database values.
– Nigel Ren
Nov 20 at 7:08
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Eva i just store the date only
– dhara
Nov 20 at 7:05
@Eva i just store the date only
– dhara
Nov 20 at 7:05
Can you show the actual dates your using (both from the database and the ones in
$newDate
) as well as the datatype of the database values.– Nigel Ren
Nov 20 at 7:08
Can you show the actual dates your using (both from the database and the ones in
$newDate
) as well as the datatype of the database values.– Nigel Ren
Nov 20 at 7:08
|
show 5 more comments
4 Answers
4
active
oldest
votes
Change your query to below query and check.
You have to pass date in single or doube quote.
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "'.$newDate.'" AND billdate <= "'.$newDate2.'" ORDER by `vno`')->result_array();
Let me know if still having issue.
thank you for your help :)
– dhara
Nov 20 at 10:09
add a comment |
You can use Between
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN "$newDate" AND "$newDate2" ORDER by `vno`
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
add a comment |
If you store the date only, I would try to use unix timestamp.
$snewsDate = strtotimr($startdate);
$newDate2 = strtotime($enddate);
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN
UNIX_TIMESTAMP($newDate) AND UNIX_TIMESTAMP($newDate2) ORDER by `vno
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
add a comment |
Try this one:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$newDate = date_format(date_create($startdate),"Y-m-d");
$newDate2 = date_format(date_create($enddate),"Y-m-d");
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query("SELECT vno,Prdtname,Qty,bundle FROM purchaseitem WHERE billdate BETWEEN '$newDate' AND '$newDate2' ORDER by vno")->result_array();
$data['query'] = $query;
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in theview
. Share your view coding.
– Twinkle
Nov 20 at 8:33
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387737%2fhow-to-get-the-values-in-between-the-range-by-using-where-clause%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Change your query to below query and check.
You have to pass date in single or doube quote.
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "'.$newDate.'" AND billdate <= "'.$newDate2.'" ORDER by `vno`')->result_array();
Let me know if still having issue.
thank you for your help :)
– dhara
Nov 20 at 10:09
add a comment |
Change your query to below query and check.
You have to pass date in single or doube quote.
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "'.$newDate.'" AND billdate <= "'.$newDate2.'" ORDER by `vno`')->result_array();
Let me know if still having issue.
thank you for your help :)
– dhara
Nov 20 at 10:09
add a comment |
Change your query to below query and check.
You have to pass date in single or doube quote.
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "'.$newDate.'" AND billdate <= "'.$newDate2.'" ORDER by `vno`')->result_array();
Let me know if still having issue.
Change your query to below query and check.
You have to pass date in single or doube quote.
$query = $this->db->query('SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate >= "'.$newDate.'" AND billdate <= "'.$newDate2.'" ORDER by `vno`')->result_array();
Let me know if still having issue.
edited Nov 20 at 9:38
answered Nov 20 at 9:29
Yogendrasinh
268113
268113
thank you for your help :)
– dhara
Nov 20 at 10:09
add a comment |
thank you for your help :)
– dhara
Nov 20 at 10:09
thank you for your help :)
– dhara
Nov 20 at 10:09
thank you for your help :)
– dhara
Nov 20 at 10:09
add a comment |
You can use Between
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN "$newDate" AND "$newDate2" ORDER by `vno`
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
add a comment |
You can use Between
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN "$newDate" AND "$newDate2" ORDER by `vno`
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
add a comment |
You can use Between
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN "$newDate" AND "$newDate2" ORDER by `vno`
You can use Between
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN "$newDate" AND "$newDate2" ORDER by `vno`
answered Nov 20 at 7:01
Arup Garai
1016
1016
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
add a comment |
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
Thanks for the reply..But i get no value
– dhara
Nov 20 at 7:03
add a comment |
If you store the date only, I would try to use unix timestamp.
$snewsDate = strtotimr($startdate);
$newDate2 = strtotime($enddate);
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN
UNIX_TIMESTAMP($newDate) AND UNIX_TIMESTAMP($newDate2) ORDER by `vno
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
add a comment |
If you store the date only, I would try to use unix timestamp.
$snewsDate = strtotimr($startdate);
$newDate2 = strtotime($enddate);
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN
UNIX_TIMESTAMP($newDate) AND UNIX_TIMESTAMP($newDate2) ORDER by `vno
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
add a comment |
If you store the date only, I would try to use unix timestamp.
$snewsDate = strtotimr($startdate);
$newDate2 = strtotime($enddate);
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN
UNIX_TIMESTAMP($newDate) AND UNIX_TIMESTAMP($newDate2) ORDER by `vno
If you store the date only, I would try to use unix timestamp.
$snewsDate = strtotimr($startdate);
$newDate2 = strtotime($enddate);
SELECT `vno`,`Prdtname`,`Qty`,`bundle` FROM purchaseitem WHERE billdate BETWEEN
UNIX_TIMESTAMP($newDate) AND UNIX_TIMESTAMP($newDate2) ORDER by `vno
answered Nov 20 at 7:15
Eva
939
939
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
add a comment |
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
Thanks for the reply..But i didn't get any result
– dhara
Nov 20 at 7:25
add a comment |
Try this one:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$newDate = date_format(date_create($startdate),"Y-m-d");
$newDate2 = date_format(date_create($enddate),"Y-m-d");
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query("SELECT vno,Prdtname,Qty,bundle FROM purchaseitem WHERE billdate BETWEEN '$newDate' AND '$newDate2' ORDER by vno")->result_array();
$data['query'] = $query;
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in theview
. Share your view coding.
– Twinkle
Nov 20 at 8:33
|
show 1 more comment
Try this one:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$newDate = date_format(date_create($startdate),"Y-m-d");
$newDate2 = date_format(date_create($enddate),"Y-m-d");
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query("SELECT vno,Prdtname,Qty,bundle FROM purchaseitem WHERE billdate BETWEEN '$newDate' AND '$newDate2' ORDER by vno")->result_array();
$data['query'] = $query;
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in theview
. Share your view coding.
– Twinkle
Nov 20 at 8:33
|
show 1 more comment
Try this one:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$newDate = date_format(date_create($startdate),"Y-m-d");
$newDate2 = date_format(date_create($enddate),"Y-m-d");
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query("SELECT vno,Prdtname,Qty,bundle FROM purchaseitem WHERE billdate BETWEEN '$newDate' AND '$newDate2' ORDER by vno")->result_array();
$data['query'] = $query;
Try this one:
$startdate = $this->input->post('SDate');
$enddate = $this->input->post('EDate');
$newDate = date_format(date_create($startdate),"Y-m-d");
$newDate2 = date_format(date_create($enddate),"Y-m-d");
$data['startdate'] = $startdate;
$data['enddate'] = $enddate;
$query = $this->db->query("SELECT vno,Prdtname,Qty,bundle FROM purchaseitem WHERE billdate BETWEEN '$newDate' AND '$newDate2' ORDER by vno")->result_array();
$data['query'] = $query;
edited Nov 20 at 9:41
answered Nov 20 at 8:07
Twinkle
1499
1499
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in theview
. Share your view coding.
– Twinkle
Nov 20 at 8:33
|
show 1 more comment
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in theview
. Share your view coding.
– Twinkle
Nov 20 at 8:33
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
Thanks for the reply..but getting no reuslt
– dhara
Nov 20 at 8:09
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
date_format() expects parameter 1 to be DateTimeInterface, boolean given getting this error and printed nothing
– dhara
Nov 20 at 8:12
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
Please share your database snapshot
– Twinkle
Nov 20 at 8:15
added on my post
– dhara
Nov 20 at 8:27
added on my post
– dhara
Nov 20 at 8:27
Where you are not getting the data, I think the problem is in the
view
. Share your view coding.– Twinkle
Nov 20 at 8:33
Where you are not getting the data, I think the problem is in the
view
. Share your view coding.– Twinkle
Nov 20 at 8:33
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387737%2fhow-to-get-the-values-in-between-the-range-by-using-where-clause%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you print your query and post it here?
– Yogendrasinh
Nov 20 at 7:00
Hi! How is yout date stored in the db? Don't you need the H:i:s added to the date?
– Eva
Nov 20 at 7:02
@Yogendrasinh I am getting no values for this query tried in phpmyadmin
– dhara
Nov 20 at 7:04
@Eva i just store the date only
– dhara
Nov 20 at 7:05
Can you show the actual dates your using (both from the database and the ones in
$newDate
) as well as the datatype of the database values.– Nigel Ren
Nov 20 at 7:08