mailing labels from DB

A

Anonymous

Guest
hello,
I need to create i mySQL database for a client, one of the features that they want is to be able to log into the administration site, and print off mailing lables from the DB, so does any one know how i would go about doing this. I know that I can make the information display in tables , but is there any way I can export it to some .txt (page by page), or should i just use an access DB, and have them d/l it and do everything from access. The one problem is that this DB has the potential to hace tens of thousands of entries in it. Any ideas or wisdom would be appreciated.

justin
 
There are several ways to solve this problem, depending on how many options you want to give your client.
The fastest way is probably to export the names and adresses to a normal text file using Php. You can use acces to generate reports eg. mailing labels, page by page.

Your question is really a little to general to be giving a specifik anserw
 
tx for responding,
Well, it would work this way, in the administration site, they would have a list of all people in it (or many lists) besides each name their would be a check box(Add to mailing label). if selected the names would be put in a table formatted for mailing size, which would then have to be printed out in some sort of text file that would conform to exact dimensions for the mailing list sticker size that it would be printed on. This would also have to have a function that if more names were selected that could fit on one page, a second page would have to be generated. Forget about access, I am going to use mySQL.
 
justin said:
tx for responding,
Well, it would work this way, in the administration site, they would have a list of all people in it (or many lists) besides each name their would be a check box(Add to mailing label). if selected the names would be put in a table formatted for mailing size, which would then have to be printed out in some sort of text file that would conform to exact dimensions for the mailing list sticker size that it would be printed on. This would also have to have a function that if more names were selected that could fit on one page, a second page would have to be generated. Forget about access, I am going to use mySQL.
I wouldn't do that. Get them to invest in proper label printing software (MS Word will do). Set that up to print the labels, export the details to a text file and use that to populate the labels.
 
ok,
but they then have to cut and paste all the information into word (or inport it into word and then format it) , into the label maker template, we have talked about that allready and they said that they wouldn'd want to do that. Or am I wrong about this ?
 
Word has pretty fancy importing options, so does Excel actually, i'm not exactly sure how to do it but i'm pretty sure it's possible. What i do know ... and what i've done before, is to make a link between an Acces Query and labels in Word. This way you select query fields and output them into word labels.

Its a matter of figuring this stuff out because i'm not exactly sure how i used to do it anymore.
 
No no no, this is how you do it!

You set up your script, however you like, to generate a comma delimited text file containing all the data. A CDT file is like this
"Heading1","Heading2","Heading3"
"Row1Value1","Row1Value2","Row1Value3"
"Row2Value1","Row2Value2","Row2Value3"
"Row3Value1","Row3Value2","Row3Value3"

OK, in Word you set up a mail-merge label, and set the file to import as the location where PHP will generate the file (have one made up ready for this part). In your label template (in Word now), enter the fields {{Heading1}} {{Heading2}} {{Heading3}} (using the mail-merge wizard if that's easier) wherever you want the corresponding values to appear, complete the rest of the settings for the label and you're done.

Whenever you want to print labels, make the text file first (get PHP to generate it after a form action), then open up word and it'll load the file and fill in all the values automatically. Simple!
 
tx jay, i tested it and it worked great, thanks for the help, now i just need to figure out how to export a CDT, I should be able to figure it out (still a newbie)

another question though, when i bring it into word it displays it like this

Row1Value1Row1Value2"Row1Value3"

how can i make it look like this

Row1Value1
Row1Value2
Row1Value3

But again, thanks for the help.

justin
 
Back
Top