質問編集履歴

1

変数の名称変更

2020/12/09 03:30

投稿

aomo_study
aomo_study

スコア3

test CHANGED
File without changes
test CHANGED
@@ -72,7 +72,7 @@
72
72
 
73
73
  router.get('/authed/ths_home',async function (req, res, next) {
74
74
 
75
- let postnumber = 0
75
+ let page_count = 0
76
76
 
77
77
  let pageCount=null
78
78
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  router.get('/authed/ths_home',async function (req, res, next) {
106
106
 
107
- let postnumber = 0
107
+ let page_count = 0
108
108
 
109
109
  let pageCount=null
110
110
 
@@ -118,7 +118,7 @@
118
118
 
119
119
       //動いた時と、ここが違う↓
120
120
 
121
- posts = await client.query("SELECT * FROM ths_data_table WHERE sentence LIKE '%$1%' ORDER BY table_id DESC LIMIT 10 OFFSET 10*$2;",[search_word,page_count]);
121
+ pageCount = await client.query("SELECT * FROM ths_data_table WHERE sentence LIKE '%$1%' ORDER BY table_id DESC OFFSET 10*$2;",[search_word,page_count]);
122
122
 
123
123
     }
124
124