Jump to content

YorkshireSteve

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

YorkshireSteve's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All, I'm creating a basic search on a website and want to sort results by relevance. I'm using InnoDB tables so can't use Full-Text searches, but want to order results be relevance. I am searching in title (varchar) and description (longtext), and want items to be sorted based on the number of times a term appears, and where. For example, for every time 'bath' appears in the `title` column, it scores 3 points, whereas for every instance in the `description` column it scores one point. I know there are plenty of ways I can do this with my PHP front-end, but I'm wanting to try this in MySQL (after all, this is part of the data-retrieval process). Any comments are much appreciated! Thanks, Steve
  2. [!--quoteo(post=362197:date=Apr 6 2006, 01:38 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 6 2006, 01:38 PM) [snapback]362197[/snapback][/div][div class=\'quotemain\'][!--quotec--] as long as your Login_Form component is simply an HTML form, you could use file_get_contents() to assign the content of the component to a variable and echo it out inside the template tag. [/quote] Thanks for the reply. Anything represented by [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]{{Content:xxxx}}[!--fontc--][/span][!--/fontc--] is HTML code, pulled straight from a database. Anything in the form of [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]{{Component:xxxx}}[!--fontc--][/span][!--/fontc--] will need to be included as this is going to be executable code (such as a poll, form (including processing) etc.
  3. Hi All, I'm creating a basic template system for a website and have variables in the content such as [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]{{Content:Body}}[!--fontc--][/span][!--/fontc--] which would be replaced with the variable [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]$content['body'][!--fontc--][/span][!--/fontc--]. This works fine, however, I also want to replace [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]{{Component:Login_Form}}[!--fontc--][/span][!--/fontc--] with the file [!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--]Components/Login_Form.php[!--fontc--][/span][!--/fontc--]. I'm not having much luck with this but it's something which would be very handy not only on this project, but also on other projects in the future. Does anyone have any ideas how this may be achieved? Thanks, Steve
×
×
  • 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.