Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유제
/
CultureGallery
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
YujeLee
2020-12-05 06:27:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
56b98cab7469a6086706c01ed4e1d3eae096ba50
56b98cab
1 parent
0f68c19a
Backend sortbydate.js 개발 중(검색엔진)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
map_sql/sortbydate.js
map_sql/sortbydate.js
0 → 100644
View file @
56b98ca
var
mysql
=
require
(
'mysql'
);
var
near_show_list
=
[];
var
connection
=
mysql
.
createConnection
({
"host"
:
"culturegallery.cm2bwcuyukrm.us-east-1.rds.amazonaws.com"
,
"user"
:
"root"
,
"password"
:
"dldbwp1207"
,
"port"
:
"3306"
,
"database"
:
"showdata"
});
connection
.
connect
();
// 데이터 길이 파악 //
var
dataNum
=
0
;
connection
.
query
(
'SELECT COUNT (*) AS cnt FROM SHOW_DATA'
,
function
(
error
,
results
,
field
)
{
if
(
error
)
{
console
.
log
(
error
);
}
dataNum
=
results
[
0
].
cnt
;
console
.
log
(
dataNum
);
});
connection
.
query
(
'SELECT start_day FROM SHOW_DATA WHERE start_day>=2021/01/01 ORDER BY start_day'
,
function
(
error
,
results
,
field
){
if
(
error
){
console
.
log
(
error
);
}
console
.
log
(
results
);
})
connection
.
end
();
\ No newline at end of file
Please
register
or
login
to post a comment