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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.