如果数据created_at日期时间列等于明天日期,我想检索mysql表数据,例如:
SELECT * FROM sales_order where created_at = tomorrow_date;
Run Code Online (Sandbox Code Playgroud) 我有一个连接表,在表中我想与主表连接有一个datetime列名delivery_date_to,我想减去delivery_date_to当前日期时间,减法结果将以天和小时格式(例如:2天23小时)作为记录.这是我加入桌子的方式,
SELECT marketplace_orders.entity_id as id,
sales_order.delivery_date_to as delivery_date_to,
(deliver_date_to - current_time = xx days xx hour) as time_left
FROM marketplace_orders
INNER JOIN sales_order
ON sales_order.entity_id = marketplace_orders.order_id
AND sales_order.status IN ("pending","processing")
Run Code Online (Sandbox Code Playgroud) 我的Ubuntu 18.04服务器使用Apache 2作为Web服务器,我使用letencrypt为phabricator vhost域创建了一个SSL
sudo certbot --apache -d phabricator.xxxx.com
Run Code Online (Sandbox Code Playgroud)
我试图为我的制颤器设置notification.servers配置,如下所示:
[
{
"type": "client",
"host": "phabricator.xxxx.com",
"port": 22280,
"protocol": "https"
},
{
"type": "admin",
"host": "127.0.0.1",
"port": 22281,
"protocol": "http"
}
]
Run Code Online (Sandbox Code Playgroud)
这是vhost配置文件phabricator.xxxx.com.conf和phabricator.xxxx.com-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin xxx@xxxx.com
DocumentRoot /var/www/html/repository/phabricator/webroot
ServerName phabricator.xxxx.com
ServerAlias www.phabricator.xxxx.com
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteCond %{REQUEST_URI} ^/ws/
RewriteCond %{QUERY_STRING} transport=websocket
RewriteRule /(.*) ws://localhost:22280/$1 [B,P,L]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/repository/phabricator/webroot/> …Run Code Online (Sandbox Code Playgroud) 我希望将数组与另一个数组匹配,如果数组中的内容与另一个数组相同以及匹配的数量,例如:
array2 = [1,2,3];
array1 = [1,3];
console.log(findMatch(array1,array2));
//result["total_match"] = 2
//result["not_match"] = [2]
array2 = [4,5,6];
array1 = [6,4,5];
console.log(findMatch(array1,array2));
//result["total_match"] = 3
//result["not_match"] = []
array2 = [1,4,7];
array1 = [4,2,3,8,5];
console.log(findMatch(array1,array2));
//result["total_match"] = 1
//result["not_match"] = [1,7]
function findMatch(array1,array2){ // fill
var result = [];
result["total_match"] = 0;
result["not_match"] = [];
//????
return result;
}
Run Code Online (Sandbox Code Playgroud)
基本上array2是一个3索引的数组,我希望与另一个动态匹配array1,我想得到总匹配的结果,以及数组中不匹配的值
datetime ×2
mysql ×2
apache ×1
arrays ×1
date ×1
javascript ×1
left-join ×1
lets-encrypt ×1
phabricator ×1
ssl ×1
websocket ×1