Andy82 Posted November 8, 2008 Share Posted November 8, 2008 Hey, I am trying to build a function for lastest entries. I have... function new_stuff() { global $prefix, $options; $new_stuff = get_cache('new_stuff'); if (!$new_stuff) { $new_stuff_query = mysql_query("SELECT title, contentid, FROM ". $prefix ."content WHERE status = '1' ORDER BY dateadded DESC, contentid DESC LIMIT ". $options['max_new_stuff']) or die (mysql_error()); $counter = '0'; $new_stuff = array(); while ($new_stuff_row = mysql_fetch_assoc($new_stuff_query_query)) { $counter++; $new_stuff[] = array ( 'id' => $new_stuff_row['contentid'], 'title' => $new_stuff_row['title'], 'counter' => $counter ); } // Write cache file write_cache('new_stuff', $new_stuff); } return $new_stuff; } This works fine, the problem I am having is with content sections. I have a section id in my content table e.g Content table title contentid sectionid Sections sectionid section How do I display the sectionid in the content table to display as the section text in the sections table? Thank you for any help. Quote Link to comment 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.