Gossamer Forum
Home : Products : DBMan : Installation :

short view not showing all possibilities

Quote Reply
short view not showing all possibilities
this is my code:
sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

print qq|
<table width="500" cellpadding="3" cellspacing="1" border="2" bgcolor="#ffffcc">
<tr>
<td><a href="$db_script_link_url&ww=on&$db_key=$rec{$db_key}&view_records=1">$rec{'ID'}</a></td>
<td>$rec{'grade'}</td>
<td>$rec{'year'}</td>
<td>$rec{'color'}</td>
<td>$rec{'price'}</td>
<td>$rec{'area'}</td>
</tr>
</table>
|;
}
I borrowed this from GeorgeJetson but since I fiddled with it something is going wrong ... I only get 1 view even if there are several possibilities .... any clues?

Thanks folks
Quote Reply
Re: short view not showing all possibilities In reply to
My guess is that your problem is in sub html_view_success.


------------------
JPD
Quote Reply
Re: short view not showing all possibilities In reply to
ahhhhhhh, strange I've been going over my html.pl file but I swear that I haven't played with the perl coding only the html. I still have to short views showing only as 1-clean one but having 2 options. Iwould really appreciate it if someone would look at my page and give me some feed back. I've been searching for my stupidiy problems forgotten tags and such ( Smile actually found some).

my homepage is at:
http://www.voicenet.co.jp/~carstenr
viewable files are at:
http://www.voicenet.co.jp/~carstenr/dbman/htmlpl.txt
http://www.voicenet.co.jp/~carstenr/dbman/defaultcfg.txt
http://www.voicenet.co.jp/~carstenr/dbman/formatpl.txt

My homepage is actually nothing but a whole load of test scripts that I've been trying. Obviously you'll see other database scripts but beyond any imaginable doubt DBMAN IS MY CHOICE (i just haven't cleaned up my page for months.) You really can't beat this script. Trust me I've tried all the free database scripts from CGI Resource Index -- take a look if you don't believe me. I'm hooked on DBMAN and when things get rolling I'll be sending ALex a check if I can convince the guy to share some with JPDeni (umm what you think Alex)

Quote Reply
Re: short view not showing all possibilities In reply to
 Smile Well, Alex has given me a whole lot already -- in terms of sending business my way and making the script available for me to use without having to shell out the bucks. I'm perfectly happy with the current setup. Smile

Just for debugging purposes, why don't you try taking out the "long view" part -- comment out

Code:
if ($db_total_hits == 1) {
&html_record_long(&array_to_hash($_, @hits));
}
else {

and one of the closing brackets at the end of html_view_success.

See if that gives you your list of records. If so, then we've got an idea of where the problem is. If not, we'll have to look some more. Smile


------------------
JPD

All my advice is offered on the basis of kindness-ware. If I've helped you to solve a problem, go out of your way to be kind to someone today.

Quote Reply
Re: short view not showing all possibilities In reply to
Hey JP, I tried the commenting out idea but it screws up the replies and views (I got blank pages). so, I edited the default.db files so that the data ID numbers start at 1 instead of some weird number. Now, I notice that it's not showing all 3 but the first 2 and on a new addition it will not show 1 data entry -- somewhere it's minusing 1.... any ideas?

If you're using netscape 4.0 + you can change the view character set to Japanese (auto - Detect) to see the Japanese writing on the screens.

Also how do you set the database ID to input into the text field automatically ? I saw it somewhere but I'M going brain dead Smile Because I'm trying to switch all my files over to a new server and the new place is screwing DBMAN up pretty good -- strange unix paths???? That's another post.

Thanks folks
Quote Reply
Re: short view not showing all possibilities In reply to
To get the script to automatically enter the ID numbers, set $db_key to 1 in the .cfg file.

I would suggest that, since you changed servers, you start with the default DBMan database so you can iron out your problems with paths and such first. Then try adding your own modified scripts.


------------------
JPD


Quote Reply
Re: short view not showing all possibilities In reply to
hmmm, I'm burning the candle at all possible ends. The old server I'm working on the html.pl outputting and getting things going. On the new server I'm trying to figure things out with like you recommended using the default DBMAN setup and such since there's less things happening that I haven't encountered already. Thanks for the basic information about the ID problem. I'm still wondering about the mysterious minus 1 data output thing though.

------------------
Thanks for everything !
Quote Reply
Re: short view not showing all possibilities In reply to
Okay, just the changed the db key from 'ID' to '1' and all I get is errors in searches (nothing defined). OH well, I'm a little more interested in the mysterious lost output problem right now.
Quote Reply
Re: short view not showing all possibilities In reply to
jee, I played with DBMAN so much today. uping and downing files from the server so much that it works now??? I guess this solution is almost as good as going the zoo with my kids -- one problem I don't have any yet Smile we'll see about next year.

I also switched the dbkey about 3 times from ID to 1 and back to ID and upped it via ascii and binary a couple of times and it works .... hmmm this is getting a little too mystic for me.

Thanks JP
Quote Reply
Re: short view not showing all possibilities In reply to
  Must be gremlins at work!


------------------
JPD