Skip to content

Instantly share code, notes, and snippets.

@jnaskali
Created March 8, 2012 10:15
Show Gist options
  • Save jnaskali/2000138 to your computer and use it in GitHub Desktop.
Save jnaskali/2000138 to your computer and use it in GitHub Desktop.
OsCommerce: Export customer email list
<?php
mysql_connect(localhost,'USER','PASS');
@mysql_select_db('DATABASE') or die( "Unable to select database");
$sql = 'SELECT customers_email_address FROM customers';
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
echo $row['customers_email_address'] . "\n";
}
mysql_close();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment