zgkhoo Posted November 3, 2007 Share Posted November 3, 2007 <?php include 'config.php'; include 'opendb.php'; $tableName = 'person'; $backupFile = 'backup/person.sql'; $query = "SELECT * INTO OUTFILE '$backupFile' FROM $tableName"; $result = mysql_query($query); include 'closedb.php'; ?> there is no *.sql file appear in my folder after i running this script,why? thanks.. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 3, 2007 Share Posted November 3, 2007 That script will basically export all the data from the person table and put into the person.sql file within the backup folder What is happening when you run the script? Quote Link to comment Share on other sites More sharing options...
ignace Posted November 3, 2007 Share Posted November 3, 2007 shouldn't the file already exist before you can execute such queries? or maybe the file is created but instead in the sql folder Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 3, 2007 Author Share Posted November 3, 2007 That script will basically export all the data from the person table and put into the person.sql file within the backup folder What is happening when you run the script? just the file wont appear ....i cant find it at all in my /htdoc folder Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 3, 2007 Author Share Posted November 3, 2007 shouldn't the file already exist before you can execute such queries? or maybe the file is created but instead in the sql folder backup//person.sql should be inside a folder called backup rite? i cant see any "backup" folder after running this script. Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 3, 2007 Author Share Posted November 3, 2007 *bump* Quote Link to comment Share on other sites More sharing options...
rlindauer Posted November 3, 2007 Share Posted November 3, 2007 The directory has to exist first. I would also try using the full path to the file, not a relative path. Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 3, 2007 Share Posted November 3, 2007 does it have the right path Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 4, 2007 Author Share Posted November 4, 2007 <?php include 'config.php'; include 'opendb.php'; $tableName = 'person'; $backupFile = '/backup/person.sql'; $query = "SELECT * INTO OUTFILE '$backupFile' FROM $tableName"; $result = mysql_query($query); include 'closedb.php'; ?> i change to this also cant, wat right path u meant? Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 5, 2007 Author Share Posted November 5, 2007 *bump* Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 5, 2007 Share Posted November 5, 2007 try a plain and siple query to check where is the default destination of your file try to use static value and dont use folder or dir just a text name to see how it work and where it goes Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted November 5, 2007 Author Share Posted November 5, 2007 try a plain and siple query to check where is the default destination of your file try to use static value and dont use folder or dir just a text name to see how it work and where it goes plain and siple query ?? how? static value and dont use folder??how? sorry i m a newbie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.