[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

problem in search results counter

Posted on 2003-12-04
6
Medium Priority
?
223 Views
Last Modified: 2013-12-25

Hi,

I want to built in a counter to have the search results in a form like:

1. Dental measures...

2. University of Mental...

3. .....


I tried to do this but do not work:

$ranknumber = 1;
        if ($url == "") {
        $ranknumber++;


any ideas how could I implement this??

Many thanks.
polos





0
Comment
Question by:polos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 250 total points
ID: 9880301
Perhaps you meant
       if ($url eq "" ){
if not, please post more code so we can see what did not work
0
 

Author Comment

by:polos
ID: 9888037
Hi,

Iam in trouble because I ant to present my results with numeration.

What Ive get in the search results at the moment is

<URL>TITLE</A>DESCRIPTION

<URL>TITLE</A>DESCRIPTION

<URL>TITLE</A>DESCRIPTION

<URL>TITLE</A>DESCRIPTION


but what I want is;

1. <URL>TITLE</A>DESCRIPTION

2. <URL>TITLE</A>DESCRIPTION

3. <URL>TITLE</A>DESCRIPTION

4 . <URL>TITLE</A>DESCRIPTION

Any change to know how to do this??

That code i show in my first message was an attempt i tried but did not work out because it always shouls " 1" in all results.


Your help will be appreciated.

Polos
0
 
LVL 84

Expert Comment

by:ozo
ID: 9890069
What is the code you are using to produce

<URL>TITLE</A>DESCRIPTION

<URL>TITLE</A>DESCRIPTION

?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:polos
ID: 9891694

Hi the main code I use to produce that is:

print "</center><a href=$url>$title</font></a>\n<br>";

print "<font size=-1 face=arial,sans-seri color=green>$description</font><p>";


ope this helps.

0
 
LVL 84

Expert Comment

by:ozo
ID: 9891764
Try

print "</center>",++$count,". <a href=$url>$title</font></a>\n<br>";
0
 

Author Comment

by:polos
ID: 9891825

It worked!

another thing that I would like to clear myself.

In our intranet search engine there are two searches that are connect to each other because we have in the search results a button to quick search the web documents and a button in the same result pages for quick search our intranet images. This quick search buttons are like those in google that appear bellow their logo.

However I have a problem that is:

When i try to search for TEETH from the WEB documents front page there is no problem because either web or image buttons will return results for TEETH. However if I make a search for more than 1  keyword for example TEETH  LONDON in the WEB frontpage in the web results there are web results for both keywords but when i click on images button I just get results for TEETH... and not with London.

Basicly the keyword parser is:

$from = "$FORM{'q'}";

In the script i include  $form in:

WEB BUTTON =   print "<a href=q?q=$form&timeout=3&cat=web>web</a>";
IMAGE BUTTON = print "<a href=q?q=$form&timeout=3&cat=images>images</a>";


Analysing the "view source" in the browser i realized that when searcing for both those keywords i get:

<a href=q?q=teeth london&timeout=3&cat=images>

that means that teeth and london come up separated and not joined with the "+", the actual search comes up as only:

<a href=q?q=teeth>

... so it just searches for TEETH...

Did you understood me?? i think was a bit confusing but hpe you can understand  this.



0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question