Á¬½Ómysql ΪʲôִÐвéѯ ½á¹û¼¯È´ÀÏûÓÐÄØ
C/C++ code:
UINT WINAPI CTEST::_ThreadTransData(LPVOID pParam)
{
CTEST&p=*(CTEST*)pParam;
while(!p.m_bExit)
{
CString strSQL;
strSQL.Format("select *¡¡from data as da where da.cid >%d order by timestamp, da.cid;",
p.m_TransferSCN);
if(mysql_master_query(&p.mysql, strSQL, strSQL.GetLength())!=0)
{
AfxMessageBox("Êý¾Ý¿âÖбí¸ñ³ö´í");
}
MYSQL_RES *result;
MYSQL_ROW row;
if(!(result=mysql_use_result(&p.mysql)))
{
AfxMessageBox("¶ÁÈ¡Êý¾Ý¼¯Ê§°Ü");
}
int i = 0;
CString sID, timestamp, srcip, srcport, dstip, dstport, data;
while(row=mysql_fetch_row(result))
{
sID.Format("%s", row[0]);
timestamp.Format("%s", row[1]);
srcip.Format("%s", row[2]);
srcport.Format("%s", row[3]);
dstip.Format("%s", row[4]);
dstport.Format("%s", row[5]);
data.Format("%s", row[6]);
//²åÈëµ½oracle
CString ssQuery;
ssQuery.Format("INSERT INTO datatemp \
(SCN, TIMESTAMP, SRCIP, SRCP
Ïà¹ØÎÊ´ð£º
Õâ¸öÊÓÆµ½²µÄºÜÏêϸ, ¶ÔÐÂÊַdz£ÓÐÓÃ, »ù±¾ÉÏÒ»¿´¾Í¶®
ÓÉÓÚÌ«´óÁË(50m, ÎÒÖ»ÄÜÉÏ´«20m), ÎÒÉÏ´«²»ÁË, Ö»ºÃÌù³öÏÂÔØµØÖ·
ÏÂÔØµØÖ·: http://ftel1.3800hk.com/0807/080720djxnzj.rar
ºÃ¶«Î÷,ϸö¿´¿´
......
ÎÒµÄmysqlÔõôûÓа취дÈëÖÐÎÄÊý¾Ý£¿Ö»ÒªÊÇÊý¾ÝдÈëÊý¾Ý¿âʱ ¾Í»á±ä³ÉÈý¸öÎʺŠ£¿Çë½Ì¸ßÈË£¡£¡
linux? ÔõôдÈëµÄ
ÔÚmysqlÖÐÖ´ÐÐ show variables like 'character%'Ìù½á¹û³öÀ´¡£
ÔÚ°²×°MYSLQʱ½«Êý¾Ý¿âµÄ×Ö· ......
echo %~dp0
CD %~dp0
mysqld.exe --defaults-file=..\my.ini --console
pause
´ó¼Ò¿´¿´ÒÔÉÏbatÎļþµÄÒâ˼£¬Çë´óÏÀ¸ø¸öÏêϸµÄ½âÊͰ¡¡£
ÕâÊÇÆô¶¯mysql·þÎñ°¡¡£
echo %~dp0
ÏÔʾµ±Ç°batËùÔÚĿ¼Ãû
CD %~dp0
......
Ҫת³ÉÒ»ÑùµÄЧ¹û£¬ÓÃpowerdesignerÔõôת£¿ÄÜתÂð£¿
create table publishers (
publisherID int identity,
publisherName varchar (30) NOT NULL,
constraint pk_publishers primary key (publisherID)
)& ......
ÇëÎÊÏÂÄÄλÈÊÐÖÓбȽϺõı¸·Ý·½°¸£¬ÓÃʲô¹¤¾ß»òÕßÓÃʲô·½Ê½£¬Ð¡µÜ½è¼øÏÂ
Ö±½ÓÓÃMYSQLDUMP±¸·Ý
OR
ÓÃSQLYOGÖ®ÀàµÄͼÐλ¯¹ÜÀí¹¤¾ß±¸·Ý
Ö±½ÓÓÃmysql×Ô´øµÄ mysqldump ¾Í¿ÉÒÔÁË¡£
http://dev.mysql.com/doc/re ......