回答編集履歴
1
追記
answer
CHANGED
@@ -3,5 +3,7 @@
|
|
3
3
|
```
|
4
4
|
↓
|
5
5
|
```php
|
6
|
-
$sql='SELECT code,date,column1,column2,column3 FROM table WHERE (DATE_FORMAT(date, \'%Y%m\') = ' . $currentDate . ') ORDER BY code DESC';
|
6
|
+
$sql='SELECT code,date,column1,column2,column3 FROM table WHERE (DATE_FORMAT(date, \'%Y%m\') = \'' . $currentDate . '\') ORDER BY code DESC';
|
7
|
-
```
|
7
|
+
```
|
8
|
+
|
9
|
+
想定の情報がとれるか、SQLが正しいかは別として、Syntax取り除くだけならこう。
|