Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김가영
/
Probability Death
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ubuntu
2019-05-26 07:17:05 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0dedc6e1dbcb149e521ae0b05e4a359cddd847b1
0dedc6e1
1 parent
8495c8e6
add TRUNCATE DB
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
routes/index.js
routes/index.js
View file @
0dedc6e
...
...
@@ -7,6 +7,15 @@ var db = require('../lib/db');
router
.
post
(
'/starting'
,
(
req
,
res
)
=>
{
res
.
redirect
(
`/name/
${
req
.
body
.
name
}
/birth/
${
req
.
body
.
birth
}
/city/
${
req
.
body
.
city
}
/county/
${
req
.
body
.
county
}
/village/
${
req
.
body
.
village
}
`
);
})
sql1
=
"TRUNCATE weatherInfo"
;
db
.
query
(
sql1
,
function
(
err
,
rows
,
fields
){
if
(
err
)
{
console
.
log
(
err
);
}
});
router
.
get
(
'/name/:name/birth/:birth/city/:city/county/:county/village/:village'
,
(
req
,
res
)
=>
{
// 렌더링 변수
...
...
@@ -25,7 +34,7 @@ router.get('/name/:name/birth/:birth/city/:city/county/:county/village/:village'
const
county
=
req
.
params
.
county
;
const
village
=
req
.
params
.
village
;
// 이전
1
0분간 데이터 찾기
// 이전
2
0분간 데이터 찾기
sql
=
"SELECT * FROM weatherInfo WHERE time >= DATE_FORMAT(DATE_ADD(now(), INTERVAL -20 MINUTE), '%Y-%m-%d %H:%i:%s')"
;
db
.
query
(
sql
,
function
(
err
,
rows
,
fields
){
if
(
err
)
...
...
Please
register
or
login
to post a comment