2 messages in com.mysql.lists.plusplusC++ query to backup table from database
FromSent OnAttachments
Arlis Rose30 Jun 2005 11:09 
Warren Young30 Jun 2005 15:13 
Subject:C++ query to backup table from database
From:Arlis Rose (arl@endevouraerospace.com)
Date:06/30/2005 11:09:09 AM
List:com.mysql.lists.plusplus

Hey guys, hopefully someone can help me out here. Just started using mySQL with C++ and I need to know how to do a more advanced query. Okay so far I can query to get data out of the database: querry.Format("SELECT FromUser, Subject, Body, Unread, DataID from receivedemail"); and I can put data in the database as well: querry.Format("INSERT INTO receivedemail (ToUser, Subject, FromUser, Body) VALUES(\"%s\", \"%s\", \"%s\", \"%s\")", receive_from, receive_sub, "atic@yahoo.com", MessageReceived);

Now what I want to be able to do is 2 things,

First: what query could I pass that would create a backup of the database (database is myEMAIL and TABLE is receivedEmail) by date, so for example myEMAIL_receivedEmail_050630.sql

Second: (this one I think I know already but don't hurt to ask :) to then delete all entries from that database (I'd assume it would just be: querry.Format("DELETE * From receivedemail");

So is it possible to send a command (via a MYSQL query) that will backup my database? Thanks a lot for all help. Daemon