cerberus478 Posted September 19, 2011 Share Posted September 19, 2011 Hi I have the following code, this code is suppose to get the data from the galleries table and the pages table. I think my problem is the sql statement but I'm not sure. public function galleries(){ foreach($this->_params['list'] as $gallery){ $id = $gallery['id']; $name = $gallery['name']; $select = "SELECT * FROM pages, galleries WHERE pages.name = {$gallery['name']}"; $this->_params['item'] = $this->_model->get(array("pages.name = 'galleries.name'")); } the code $this->_params['item'] = $this->_model->get(array("pages.name = 'galleries.name'")); works just fine with the home page and all the other pages. I have 2 galleries called gallery 1 and gallery 2, now my problem is that I need the sql to go through the galleries table look for the name and then look through the pages table and get the meta data from the same name. There is no foreign id because I only need it for the galleries and nothing else. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/247411-meta-description-help/ Share on other sites More sharing options...
cerberus478 Posted September 21, 2011 Author Share Posted September 21, 2011 Isn't anyone gonna help??? Quote Link to comment https://forums.phpfreaks.com/topic/247411-meta-description-help/#findComment-1271276 Share on other sites More sharing options...
JKG Posted September 21, 2011 Share Posted September 21, 2011 dont cry, clarify. Quote Link to comment https://forums.phpfreaks.com/topic/247411-meta-description-help/#findComment-1271403 Share on other sites More sharing options...
cerberus478 Posted September 21, 2011 Author Share Posted September 21, 2011 well thankfully I don't need anymore help because I ended up getting help today from another place. Quote Link to comment https://forums.phpfreaks.com/topic/247411-meta-description-help/#findComment-1271480 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.