dealend を今ではなく昨日に設定したい。このコマンドラインでそれを行う方法はありますか?
$query = mysqli_query($myConnection, "UPDATE bookdeals SET dealend='now()' WHERE id='$pid'") or die (mysqli_error($myConnection));
... SET dealend = now() - INTERVAL 1 DAY
Note that with the 'now()'
you're using, you're not using a function called "now". You're trying to set your table field to be a string whose contents are the letters n
, o
, w
etc.... Quotes turn things into strings and those things lose their specialty once they've been stringed.
MySQL DATE_SUB 関数を使用できます
... dealend=DATE_SUB(now(),INTERVAL 1 DAY) ...
MySQL 日付関数の詳細については、こちらをお読みください