Current location: Hot Scripts Forums » Programming Languages » PHP » dumping spesific columns into a database


dumping spesific columns into a database

Reply
  #1 (permalink)  
Old 10-27-03, 02:51 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
dumping spesific columns into a database

How do I do this?

I want to from a table, called companies, dump "compid,company,classificationids" into a text file, but I can't seem todo this. I tried the following, and get an error:

mysql> select compid,company,classificationids from companies where referer="Matrix MArketing" into outfile "/home/tradeleads/matrix_marketing.sql" fields terminated by ',' optionally enclosed by '"' lines terminated by "\n";
ERROR 1: Can't create/write to file '/home/tradeleads/matrix_marketing.sql' (Errcode: 13)
mysql>


I also tried it with mysqldump, but it doesn't output anything. Is there a way of dumping only certain columns from a certain table?
Reply With Quote
  #2 (permalink)  
Old 10-27-03, 01:53 PM
tega tega is offline
New Member
 
Join Date: Sep 2003
Location: Austin
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
You it sounds like you are trying to dump into a file that mysql cant write to. Check you dir permissions. Also try dumping to tmp.
Quote:
Originally Posted by lordmerlin
How do I do this?

I want to from a table, called companies, dump "compid,company,classificationids" into a text file, but I can't seem todo this. I tried the following, and get an error:

mysql> select compid,company,classificationids from companies where referer="Matrix MArketing" into outfile "/home/tradeleads/matrix_marketing.sql" fields terminated by ',' optionally enclosed by '"' lines terminated by "\n";
ERROR 1: Can't create/write to file '/home/tradeleads/matrix_marketing.sql' (Errcode: 13)
mysql>


I also tried it with mysqldump, but it doesn't output anything. Is there a way of dumping only certain columns from a certain table?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Share database over the Internet nitinkedia The Lounge 2 11-20-03 02:07 PM
SQL database registration form help vinhkhuong PHP 3 10-10-03 03:49 AM
tracking down a database problem ... bjmcintosh ASP 1 08-29-03 07:52 AM
Share database over the internet nitinkedia PHP 0 07-11-03 12:22 AM
Share database over the Internet nitinkedia New Members & Introductions 1 07-10-03 02:50 PM


All times are GMT -5. The time now is 07:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.