MySqlTalk.com  

Go Back   MySqlTalk.com > Programming Languages and MySQL > PHP
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 02-18-2005, 01:06 PM   #1
hekg
Junior Member
 
Join Date: Feb 2005
Posts: 2 hekg is on a distinguished road
How can I have all of the emails in my database appear withou the "@domain.com"

I would like to have webpage that users can visit and see a listing of all the email addresses stored but have everthing after the "@" symbol removed to protect the email addresses from being copied. Any suggestions? Thank you.
hekg is offline   Fork this post Reply With Quote
Old 02-18-2005, 01:49 PM   #2
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: How can I have all of the emails in my database appear withou the "@domain.com"

Use "gd" and display the link as a picture. For an example visit http://www.whois.sc and notice how they list the owner's email address.
Azkaban is offline   Fork this post Reply With Quote
Old 02-18-2005, 05:47 PM   #3
hekg
Junior Member
 
Join Date: Feb 2005
Posts: 2 hekg is on a distinguished road
Re: How can I have all of the emails in my database appear withou the "@domain.com"

I actually need to display only the email address without the domain after the @ sign. The reason is that I have to create public reports which lists the people signing up to our newsletter but this report should only show the first part of the email addresses.

Ideally, if I can generate a web page that looks like this, it would be great:

1. markjohnson@
2. billt@
3. user2005@
4. any_name@
5. etc..
hekg is offline   Fork this post Reply With Quote
Old 02-18-2005, 07:50 PM   #4
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: How can I have all of the emails in my database appear withou the "@domain.com"

This might help
http://us2.php.net/manual/en/function.substr.php

Wait, I have some code lying around for this. Found it.

SUBSTRING_INDEX(email,'@',1)

But that's a MYSQL statement not a PHP statement so you have to stick that in the mysql query.
Azkaban is offline   Fork this post Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed on setting up a database! AKKI Installation 1 07-07-2005 03:53 PM
Command to return summary info about database Bex SQL syntax 0 02-01-2005 04:15 AM
Needt to design rental database - How do I begin Tsynergy Database Design 4 12-16-2004 03:09 AM
3.3 Creating and Using a Database Administrator Documentation 13 06-09-2004 04:56 PM
1.2 Overview of the MySQL Database Management System Administrator Documentation 0 06-07-2004 10:11 PM



All times are GMT -4. The time now is 07:05 PM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".