Forums / General Questions / need help with addresses

need help with addresses

Locked

Started by keystonewebworks on 4 Jun 2007, 2:26 AM · Views: 1,995

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
4 Jun 2007, 2:26 AM
#1
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

need help with addresses

please help with this:

I need a database query to give me the following:

  1. mr/mrs
  2. first name
  3. last name
  4. address 1
  5. address 2
  6. City
  7. State
  8. Zip
  9. Country

Any help with this please

Thanks,
KWW

5 Jun 2007, 2:26 AM
#2
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

any help with this???

Thanks,
KWW

5 Jun 2007, 3:26 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: need help with addresses

How are you wanting to use this?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Jun 2007, 7:55 PM
#4
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: need help with addresses

I don't know how you want to restrict this query, but all of the information that you are looking for is in the address_book table. I would do a select all from address_book where customers_id is the person you are looking for.

6 Jun 2007, 1:11 AM
#5
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

I am using 1.3.5, it shows the entry id, but not the state.

Example:

Entry ID: 51, State:Nothing Listed in the DB

Thanks,
KWW

6 Jun 2007, 1:11 AM
#6
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

I want to use this to generate a mail merge list, of the newletter subscribers, so that I can send them my newletter in the mail.

Thanks,
KWW

6 Jun 2007, 3:57 AM
#7
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

I need a specific query to get the info I need

Thanks,
KWW

6 Jun 2007, 4:47 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: need help with addresses

How about something like this:
http://www.zen-cart.com/forum/showthread.php?t=43949#post249190

... with an additional entry in your WHERE clause about
c.customers_newsletter = 1

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2007, 3:04 AM
#9
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

kind of hard to follow.....the problem is this:

Address_book table has states in as #'s not as state names, so i need to reference the zone table as well.....entry_code.

I was hoping for a complete query to do this.....

Thanks,
KWW

7 Jun 2007, 3:17 AM
#10
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

ok, i tried the query, but i got an error saying: bad handshake

Thanks,
KWW

7 Jun 2007, 3:30 AM
#11
keystonewebworks avatar

keystonewebworks

Zen Follower

Join Date:
Oct 2005
Posts:
172
Plugin Contributions:
0

Re: need help with addresses

OK...got it...had to be connected inside the database first......WORKED!!!!

DR BYTE YOU ARE AMAZING!!!!!!!!!!!!!

Thanks,
KWW

7 Jun 2007, 7:48 PM
#12
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: need help with addresses

Bad Handshake sounds to me like a SQL server error rather then an error in the query (though I have never seen that before).

Looking over the query, it will resolve the zone IDs that you have in the state to become a real state name from the zone table. If you are able to get your DB to play nice with raw query input, you should find that this will be close (if not exactly) what you are looking for.

What are you using as your DB and DB access tool (i.e. mySQL and phpMyAdmin or something else).

Sorry, I didn't see the "I Got It working" post - Great Job!**