Jump to content

transfer from existing table to a new table


severndigital

Recommended Posts

here is what I would like to do.

 

I have a table now that is populated. this table will:

 

1. get loaded with data from an outside source.

2. the data will be manipulated and added to by a php application

 

I would then like to transfer the contents of the table to a new table that is named at the time the data is processed.

 

I am at the point now of extracting the contents of the original table and loading the data into the new table. and I am getting

 

permissions errors from MySQL

saying: Access denied for user 'username'@'%' (using password: YES)

 

using phpMyadmin I checked permissions for my username and for the database I am accessing I have checked all the boxes, giving that username as much access as possible, and still no dice.

 

the command I am using is as follows

 


$bkstring = 'exports/filname.sql';
$tablename = 'origDbase';

$pulldatabase = "SELECT * INTO OUTFILE '$bkstring' FROM '$tablename'";
    $pull = mysql_query($pulldatabase)or die(mysql_error());

 

I also chmod 777 on the exports directory.

 

anyone have any ideas? or suggestions as to why the error??

thanks in advance,

chris

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.