Simple email insert issue!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cap2cap10
Forum Contributor
Posts: 158
Joined: Mon Apr 14, 2008 11:06 pm

Simple email insert issue!

Post by cap2cap10 »

hello again, php technorati. How do I insert 3000 email addresses into mysql table with only 1 ID field(auto increment) and email field using a insert query? :banghead:

Thanks again


Batoe
netgoons
Forum Newbie
Posts: 7
Joined: Sat Feb 20, 2010 2:23 am
Location: New Delhi

Re: Simple email insert issue!

Post by netgoons »

what is you data source? file as in csv/xls or to be entered manually through a UI?
If you just need to store the damn data then upload it directly to the database why bother with PHP?
User avatar
cap2cap10
Forum Contributor
Posts: 158
Joined: Mon Apr 14, 2008 11:06 pm

Re: Simple email insert issue!

Post by cap2cap10 »

Yea, I tried doing that through phpadmin but for some reason it only adds 2 addresses to the database. It is a CSV file. I am totally perplexed! :banghead:

It is a CSV (comma delimited file), So i tried to do manually using this code:

Code: Select all

mysql_query("INSERT INTO mail_list_3( mailID, email) VALUES
(' ', 'rcold@spa.net',..........) ") or die(mysql_error());
I am getting this error:
Column count doesn't match value count at row 1
I know I am close though!

Thanks in advance,


Batoe
Post Reply