I am attempting to dumping a Microsoft SQL (MSSQL) database to a file similar to how i would dump from a MySQL database using php:
$cmd = "mysql --user=".$db_user." --password=".$db_password." --host=".$hostname." --database=".$database." --execute='SELECT * FROM ".$database." '> file.txt";
exec($cmd);
But i am trying to figure out the similarities in the command line as to how it is done above with MySQL What is the proper command line syntax to execute this? Thanks.
sqlcmd: databasejournal.com/features/mssql/article.php/3654176/…escapeshellarg($db_user)and same for password and hostname or this could create security nightmares in your app :) even if this is just an example. Let's give a good example if possible.