php - Filtering a MySQL query with multiple conditions -


i have output array named "feed items" (fi):

(     [0] => array         (             [reg] => 2015-08-03 13:39:00             [id] => fd7ec4107d16b07c1a13cbdd386af8d2cb05ffca             [user_id] => de5fd44db1760b006b1909cf1db11a78b38e455c             [img] => edee88e88cf6e17732e393b5433cfd894662902e             [type] => new_join_ambition         )  ) 

i generate array named "removedfeeditems" (rfi) has following structure:

(     [0] => array         (             [object_id] => fd7ec4107d16b07c1a13cbdd386af8d2cb05ffca             [postee_id] => de5fd44db1760b006b1909cf1db11a78b38e455c             [type] => new_join_ambition         )  ) 

my mission not records have following condition:

ri.id == rfi.object_id && ri.user_id == rfi.postee_id && ri.type == rfi.type 

the query use feed items array is:

select                  i.registered reg,                  a.id,                  u.id user_id,                  ui.image_id img,                   'new_join_ambition' type,              x_ambition_invites                  left join x_user u                     on i.to = u.id                 left join x_user_images ui                      on u.id = ui.user_id                 left join x_ambitions                     on i.ambition_id = a.id             a.registered                  between '2014-07-21 14:25:03' , '2015-08-05 12:04:41'              , i.to != '8fa7a1679560876eaf2f8060abd916b692c719dc'              , i.to in ('de5fd44db1760b006b1909cf1db11a78b38e455c') 

how can adapt query implement condition remove stated record feeditems array?

thanks in advance.

try inline table:

select ...  ... (a,b,c) not in (select a1, b1, c1 union select a2, b2, c2 union select...) 

the drawback you'll have build large query string. :-(


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -