Jump to content

sibrows

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sibrows's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Many Thanks for all of your replies. Mchl, I ended up using your solution, now working like a dream. Regards Simon
  2. Hi All In simplified form I am trying to select records from two tables when x or y conditions are met. To explain I am building a very simple CMS with a table of what are effectively sub panes some are specific to the page that is viewed and the rest will be viewed on every page throughout the site. Current Tables ContentSub Content_ID (INT) Plugin_ID (INT) Default (VAR(1)) Plugins PluginID (INT) PluginName (VAR(50)) PluginPath (VAR(255)) Current Select Statement SELECT * FROM ContentSub, Plugins WHERE ContentSub.Content_ID = 'PreDefinedID' AND ContentSub.Plugin_ID = Plugins.PluginID OR ContentSub.Default = 'Y' AND ContentSub.Plugin_ID = Plugins.PluginID I'm sure this is just me misunderstanding the use of the OR statement but hey. Thanks in advance for your help. Regards Simon
  3. Great thanks worked like a charm.
  4. Hi All I've been playing with a bit of OOP I am trying to write a function to build a breadcrumbs navigation built from the contents of the URL. So far I have this: Call the function: BreadCrumbs($_SERVER['REQUEST_URI']); The function code: function BreadCrumbs($URL){ $URL_PATH = explode("/", $URL); $URL_PATHcount = count_all($URL_PATH); $Count = 1; $SubCount = 1; echo '<div class="BreadCrumbs"><a href="/"><img src="/icons/home.png"></a>'; do { echo ' > <a href="'; do { echo '/'. $URL_PATH[$SubCount]; $SubCount = $SubCount + 1; } while ($SubCount <= $Count); echo'">' . $URL_PATH[$Count] . '</a>'; $Count= $Count + 1; } while ($Count <= $URL_PATHcount); echo '</div>'; } Currently if the URL is: http://localhost/Section/SubSection/Page The Output (ignoring the home icon): > Section > SubSection > Page The issue I have is when trying to build the links for each page. Currently it is pointing to: Section = 'http://localhost/Section' SubSection = 'http://localhost/SubSection' Page = 'http://localhost/Page' I'm now a little stuck with what to try next having spent most of the weekend trying to get it sorted. Any help would be gratefully received. Simon
  5. Thats fine. I have no problems with showing the first y characters but how do I do that?
  6. Hello, this may be a really simple question but I can't seam to locate the answer using the all powerful Google! I'm trying to build a news reader on my site and instead of showing the whole news article I just want it to show the first 'x' words. My current, very cumbersome solution is to have two fields within a the database both manually filled when the article is created. I can't help thinking there is a better way of doing this. Thanks in advance. Simon
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.