Hello,
I'm trying to achieve the same as phpmyadmin does with it's export function:
get an export of the structure of the table and of the data!
I have been told there's no specific MYSQL/PHP function to do this, so I should use a perl applications mysqldump (or mysqlhotcopy I think)
I've been searching on my host for this (I'm buying webspace from a n00b), and found out the path is /usr/bin/
Then I searched in perldocumentations, and found what I need...
The problem is, it doesn't work!
This is what I tried:
The databasename = test
The table name = bsb_gastenboek
<?
system('/usr/bin/mysqldump -u rclosset -p pasword > /home/.sites/65/site131/web/php/database_dump2.sql');
//doesn't work, nomatter if the file I output to exists or not!
system('/usr/bin/mysqldump -u rclosset -p password test');
//white page
system('/usr/bin/mysqldump -u rclosset -p password test.bsb_guestbook');
//white page
system('/usr/bin/mysqldump test.bsb_guestbook);
//Here I get response:
//-- MySQL dump 8.22 -- -- Host: localhost Database: test.bsb_guestbook --------------------------------------------------------- -- Server version 3.23.54
//but of course that's not what I want, Although it proves I don't necesarily have to write to a file
//and that the mysqldump script exists and does answer!
?>
Anybody knows what I should do to get the right result?