4 folders in 1 subselect query to multidimensional arrays?
Posted: Thu May 21, 2009 10:16 pm
I'm wondering if it's possible to use a MySQL subselect query to fetch mail in four separate private message folders in MySQL and return each folder in their own arrays so that the query itself is a multi-dimensional array?
I've been trying things like this...
Is this possible? I'm mainly interested in counting the number of messages in all folders in a single folder if possible.
An added note: the MySQL tables are now relational though I thought I'd use actual folder names for the sake of simplicity.
I've been trying things like this...
Code: Select all
SELECT *FROM (SELECT * FROM private_messages WHERE id_for='inbox') AS a OR FROM (SELECT * FROM private_messages WHERE id_for='sent') AS bAn added note: the MySQL tables are now relational though I thought I'd use actual folder names for the sake of simplicity.