Gossamer Forum
Home : Products : DBMan : Installation :

search prints number of records, but only shows 1

Quote Reply
search prints number of records, but only shows 1
when I search, it will tell me how many records exist, but will only print 1 of them, anyone have this problem?

Thanks in advance

Quote Reply
Re: search prints number of records, but only shows 1 In reply to
What changes have you made to the scripts?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: search prints number of records, but only shows 1 In reply to
dear JPDENI,

I have installed the filemod and your customization of the output
the the html file is available to see at:
http://www.aliraqi.com/test/iraqihtml.pl.txt
and the cfg
http://www.aliraqi.com/test/iraqimedia.cfg.txt

Many thanks in advance JPdeni!


Quote Reply
Re: search prints number of records, but only shows 1 In reply to
I wasn't able to access your html.pl script. I got a "403 Forbidden" error. My guess is that the problem is in that file.

If you rename the file to html_pl.txt, I should be able to access it.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: search prints number of records, but only shows 1 In reply to
Dear JPDENI,
sorry about that ,i thought it would assume its a text file
anyway
ive renamed it iraqihtml.txt
so its available at
www.aliraqi.com/test/iraqihtml.txt

this is very much appreciated
thankyou in advance!



Quote Reply
Re: search prints number of records, but only shows 1 In reply to
I don't see where you're getting any of the code that is being generated on your site.

Your sub html_view_success has

Code:

print "<table><tr>";
LINE: foreach $col (@db_cols) {
if ($db_form_len{$col} == -1) { next LINE; }
elsif ($db_form_len{$col} == -2) {
if ($per_admin) { print "<td><$font>$col</td>"; }
else { next LINE; }
}
else { print "<td><$font>$col</td>"; }
}
print "</tr>";

for (0 .. $numhits - 1) {
&html_record_row (&array_to_hash($_, @hits));
}
print "</table>";
(I reformatted the lines a little bit.)

and your search results page has

Code:

<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
<TR> <TD WIDTH=20%>etc.
Your sub html_record_row consists only of

Code:

sub html_record_row {
my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record_row(%rec) and return);
}
but you have

Code:

$db_auto_generate = 0;
in your .cfg file.

Is this the html.pl and .cfg files you are actually using? From what I can see it is impossible to get the results you're getting if you have these files.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: search prints number of records, but only shows 1 In reply to
Dear JPDENI,
Im pretty certain these were the files, if not, ive upped them to the new locations listed

http://www.aliraqi.com/dbman/dbcgi.txt < DB.CGI
http://www.aliraqi.com/dbman/iraqihtml.txt < HTMLFILE
http://www.aliraqi.com/dbman/iraqimediacfg.txt < CFG FILE
http://www.aliraqi.com/dbman/iraqimediadb.txt < DB FILE

to see it in action

http://www.aliraqi.com/system/db.cgi?db=iraqimedia&uid=&view_records=1&ID=*

Thankyou very much for your help!!

Hass!


Quote Reply
Re: search prints number of records, but only shows 1 In reply to
That html.pl file was completely different than the one I looked at before! Smile

I would like you to set $db_auto_generate=1; in the .cfg file and see if that gives you your records. This will give me some clue as to where to start looking for the problem.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: search prints number of records, but only shows 1 In reply to
ok
http://www.aliraqi.com/system/db.cgi?db=iraqimedia&uid=&view_records=1&ID=*

now autogenerate is on, and it still only displays 1 record
hmmm...
intruiging the veteran!!


Quote Reply
Re: search prints number of records, but only shows 1 In reply to
You sure are! Smile

You're probably not going to like this, but I want you to save your html.pl and db.cgi files in a safe place and replace them with the completely unmodified files. Keep $db_auto_generate the way it is in your .cfg file.

See what happens. If it still only lists one record, then the problem must be somewhere in your .cfg file.

If you get both records listed, put just your modified db.cgi file back in the directory and try it again. If it only lists one record then, the problem is in your db.cgi file.

If it lists both, put your modified html.pl file back and try once more. If it only lists one, the problem is with your html.pl file. (Are you beginning to see a pattern here? Wink)

If we can narrow it down to a file that's the problem, it's a lot easier to work out where the problem is.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: search prints number of records, but only shows 1 In reply to
http://www.aliraqi.com/system/db.cgi?db=iraqimedia&uid=&view_records=1&ID=*

Done, replaced both files, and still same problem
I guess its a problem with the .cfg File Madame?


Quote Reply
Re: search prints number of records, but only shows 1 In reply to
Looks like you did some work while I was sleeping. You have all records displayed and you are using your own html.pl file. Smile

Glad you were able to figure it out.

JPD
http://www.jpdeni.com/dbman/