- Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
I'm looking to run a union query, here's what I've got:
$get_posts = $DB->query( "SELECT * FROM op_posts WHERE post_author_id IN (:ids) UNION SELECT * FROM op_post_shares WHERE share_user_id IN (:ids)", array('ids' => array(1, 2, 54)) );
But it spits out the error:
Cardinality violation: 1222 The used SELECT statements have a different number of columns
Metadata
Metadata
Assignees
Labels
No labels