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:15:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3a27cf7e01e8bd3cd1871f99c0ab598bc1efd09
b3a27cf7
1 parent
74d0aea0
Backend: sortbydate.js 개발(검색엔진)
Show 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 @
b3a27cf
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 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