Gossamer Forum
Home : Products : DBMan : Discussions :

Re: Export the database?

Quote Reply
Re: Export the database? In reply to
Mikey,

There a pretty slick addition you can add to you search form, or at least I use it from my search form. Users can then choose to get a printout of the database. This will save the database to a .txt file which can be imported into excel.

On the results page you would just need to add a link to the file so it would either open it in their browser, or allow them to save the .txt file.

You can define the delimiter within the output line.

In the FAQ noted below under the section "Files / Records" look for a thread called "Output fields to a text file".

This is great, I used it so a client could always get an updated price list from his website.

As part of my custom search form I used the following to be sure I would get all the records in the database:

<TR><TD colspan=2><$font>Number of Hits Per Page: <SELECT NAME="mh">
<OPTION VALUE="0">Choose one:
<OPTION VALUE="10">10
<OPTION VALUE="25">25
<OPTION VALUE="50">50
<OPTION VALUE="100">100
<OPTION value="$number_of_records">All Records</SELECT></font></TD></TR>

And I changed the output line so that it would display the output with the pipe delimiter like this:

$output .= "$rec{'Mfg'}|$rec{'Mfg_ID'}|$rec{'Printer'}|$rec{'Type'}|$rec{'Price'}|$rec{'Price5_10'}|$rec{'Price10+'} \n\n";

You could just change the pipes to commas if that is what you prefer to use.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Subject Author Views Date
Thread Export the database? mikey101 2625 Feb 11, 2001, 6:20 AM
Thread Re: Export the database?
LoisC 2539 Feb 11, 2001, 9:51 PM
Post Re: Export the database?
mikey101 2531 Feb 12, 2001, 9:15 AM