If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Download customers

Download customers

Started by enquirer66 on 3 May 2012, 8:56 AM · Views: 821

Results 1 to 6 of 6
3 May 2012, 8:56 AM
#1
enquirer66 avatar

enquirer66

Zen Follower

Join Date:
Sep 2007
Posts:
215
Plugin Contributions:
0

Download customers

What is the best way to download email addresses - I suppose I could use phpMyAdmin. Tried Quickbooks thing and email download but neither work. Thx.

3 May 2012, 12:19 PM
#3
enquirer66 avatar

enquirer66

Zen Follower

Join Date:
Sep 2007
Posts:
215
Plugin Contributions:
0

Re: Download customers

Nope doesn't...

3 May 2012, 2:00 PM
#4
skrillnet avatar

skrillnet

New Zenner

Join Date:
May 2010
Location:
Arkansas
Posts:
33
Plugin Contributions:
0

Re: Download customers

I would either use phpMyAdmin, or write a custom script to query the database and get the email addresses. Maybe something like this. I only have 1.5 installed anywhere, so if the table or field names are different, they will have to be modified.

<?php
include("includes/configure.php");

mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE);

$q = "SELECT * FROM " . DB_PREFIX . "customers ORDER BY customers_firstname;";

if($r = mysql_query($q)){

	$output = "
<table>
	<tr>
		<th>Customer Name</th>
		<th>Customer Email Address</th>
	</tr>";
	while($row = mysql_fetch_assoc($r)){
		$output .= "
	<tr>
		<td>" . $row['customers_firstname'] . " " . $row['customers_lastname'] . "</td>
		<td>" . $row['customers_email_address'] . "</td>
	</tr>";
	}
	$output .= "
</table>";

echo $output;
} else {
	echo "Query Failed: " . mysql_error();
}
?>
3 May 2012, 2:05 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Download customers

The mod I mentioned works fine on my Zencart test site. What problems did you have with it ?

7 Jun 2012, 9:41 AM
#6
littleacceb avatar

littleacceb

New Zenner

Join Date:
Jun 2012
Posts:
1
Plugin Contributions:
0

Re: Download customers

skrillnet:

I would either use phpMyAdmin, or write a custom script to query the database and get the email addresses. Maybe something like this. I only have 1.5 installed anywhere, so if the table or field names are different, they will have to be modified.

Hello. I'm sorry - I'm a total beginner, but where would I go to input that text? Or find phpMyAdmin?