Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Á¬½Ó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


Ïà¹ØÎÊ´ð£º

mysqlµÄÁ¬½Ó³¬Ê±Ê±¼äÔõôÉèÖà - VC/MFC / Êý¾Ý¿â

ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))

AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......

ÓÃPHPÅÅÐòmysqlÎÊÌâ

²»ÖªµÀÊDz»ÊÇÎÒµÄxamppÓÐÎÊÌ⣬mysqlÊÇͼÐλ¯µÄ£¡
Ò»¸öID×éÔÚÎÒµÄmysqlµÄ±íÀïÃæ 2£¬5£¬8£¬7
µãÁËÅÅÐò£¬È»ºóÓÃPHPÎļþÁ¬½ÓÕâ¸ö±íÏÔʾ±íµÄÐÅϢʱ£¬IDµÄ˳Ðò»¹ÊDz»±ä£¡Ó¦¸ÃÊÇ2£¬5£¬7£¬8µÄ°ÉÉýÐòÅÅÐòºó£¡
ÔÚPHPÎļþÀï ......

ASP +Mysql proc

ÏëÇë½ÌÒ»¸öÎÊÌ⣬ASP+mysql »á²»»áÓÐÁ¬½ÓĬÈÏʱ¼ä¡£
ÎÒÓöµ½Ò»¸öÎÊÌ⣺ÎÒÔÚÒ³ÃæÉϰ´Ò»¸öSave°´Å¥£¬Õâ¸ö°´Å¥ÊÇÑ­»·ÔËÐÐ100ƪ insertÊý¾ÝµÄ´æ´¢¹ý³Ì¡£ asp´úÂëÓ¦¸ÃûÓдíµÄ£¬Êý¾ÝÎÒÊÇ·ÅÔÚÒ»¸öÊý×éµÄÈç¹ûÎÒÖ»±£´æ50¸öÊÇ ......

MYSQLÈçºÎÓëC++Á¬½Ó£¿ - VC/MFC / Êý¾Ý¿â

ÎÒÊÇÐÂÊÖ£¬³õѧMYSQL£¬Óкܶ಻¶®£¬Íû´Í½Ì£¡£¡
±ÈÈç˵ÎÒн¨Ò»¸öMYSQLÊý¾Ý¿âUSER Êý¾Ý¿âÖÐÓбíLIST 
È»ºóÎÒÔÚVCÖÐн¨Ò»¸öMFC¶Ô»°¿ò¹¤³Ì£¬È»ºóÎÒÔõôÑù²ÅÄÜÓÃVC»ñµÃÊý¾Ý¿âÖбíµÄÊý¾Ý£¿
Ï£Íû¸ø³ö¾ßÌåµÄ²Ù×÷² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ