如何在codeigniter中的where语句中使用来自多维数组的值对

时间:2016-09-18 18:39:33

标签: php mysql codeigniter

我有以下数组:

$chain_combination = array (array('a','b'), array ('c','d'), array('e','f'));

如何使用$ chain_combination数组在codeigniter中进行以下查询?

SELECT  *
FROM    table
WHERE   (column1, column2) IN (('a', 'b'), ('c', 'd'), ('e','f'))

1 个答案:

答案 0 :(得分:0)

server {

        listen 443 ssl http2;
        server_name my.example.com;

        include /etc/nginx/include.d/ssl-common;
        include /etc/nginx/include.d/ssl-example;

        include /etc/nginx/include.d/all-common;

        root /var/example/my;

        location /node/app1/ {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                proxy_pass http://localhost:3131;
        }

        location ~ \.php$ {
                fastcgi_pass unix:/var/run/ssl_example_com.sock;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
        }

        access_log /var/virdisoft/logs/access.log;
        error_log /var/virdisoft/logs/error.log;
}

与foreach和implode