EvanAgee Posted March 13, 2009 Share Posted March 13, 2009 So I've got a content management system that stores page content/data in one table and assets (images, videos, etc) in a separate table. I know I can use a JOIN to get all of the data with one query, but I'm looking to match the resulting output with the PHP array I'm currently using to distribute the resulting content to the Smarty template. Currently I get all of the page data and set that array to $page. Then I do a second query to get all of the assets and set that resulting array to $page["assets"]. So, I'm wondering if there's a good way to take my new JOIN query and structure that result so rather than having one large 1 dimensional array I have an array that's setup with all of the results from the assets table as an element of the content table result array. Hope I'm making sense Link to comment https://forums.phpfreaks.com/topic/149296-getting-a-mysql-join-into-a-nice-php-array-structure/ Share on other sites More sharing options...
fenway Posted March 15, 2009 Share Posted March 15, 2009 Sorry, I don't follow. Link to comment https://forums.phpfreaks.com/topic/149296-getting-a-mysql-join-into-a-nice-php-array-structure/#findComment-785157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.