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

SQLÓï¾ä - C/C++ / C++ ÓïÑÔ

±äÁ¿ÀàÐÍ
TCHAR CName[20];
TCHAR Psw[20];
×Ö¶ÎÀàÐÍ
PassWord UserName¶¼ÎªÎı¾£¬Ó¦¸ÃÔõôдѽ

ÎÒ×Ô¼ºÐ´µÄÕâÌõ£¬²»ÕýÈ·£¬×ÜÊDzéѯ²»µ½£¬Ë³´ø¿´¿´ÊÇʲôÎÊÌâ°¡
"SELECT * from UName WHERE UserName= '+TName+' AND PassWord= '+Psw"
"SELECT * from UName WHERE UserName= '"+TName+"' AND PassWord= '"+Psw+"'"

wo han a

"SELECT * from UName WHERE UserName='" +TName+"' AND PassWord= '"+Psw+ "'";
ÄãÊÔÊÔ²»¼Ó'ºÃÏñÒ²¿ÉÒÔ¡£

ÒýÓÃ
"SELECT * from UName WHERE UserName= '"+TName+"' AND PassWord= '"+Psw+"'"


´íÎó

SQL code:

"SELECT * from UName WHERE UserName= '+TName+' AND PassWord= '+Psw"


Â¥Ö÷ʵ¼ÊÉÏÄãÕâ¾äÖ´ÐгöÀ´¾Íû°Ñ±äÁ¿¸³Öµ½øÈ¥£¬Õû¸ö¾ÍÊÇÒ»¸öconst str£¬
2Â¥Õý½â

"SELECT * from UName WHERE UserName= '+TName+' AND PassWord= '+Psw"

ÔÚÕâÀïÃæTName²»ÊDZäÁ¿£¬Ö»ÊÇTNameÁË
"SELECT * from UName WHERE UserName= '" +TName+"' AND PassWord= '"+Psw + "'"
ÕâÑù²ÅÐÐ

½¨ÒéÂ¥Ö÷
¼ÙÉèÓÐTCHAR sql[255]ÕâÑùµÄ±äÁ¿
½¨ÒéÄãÔÚÖ´ÐÐÇ°Èç¹û²»È·¶¨£¬¾Í°ÑÕâ¸ö±äÁ¿Í¨¹ýMessageBox»òÊÇÆäËü·½Ê½´òÓ¡³öÀ´¿´¿´ÊDz»ÊÇ×Ô¼ºÏëÒªµÄ

=========================================


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

ÇóÒ»SQL - MS-SQL Server / »ù´¡Àà

tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......

sql ÎÊÌâ - MS-SQL Server / »ù´¡Àà

ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......

¸ÕѧÍêCµÄ»ù´¡£¬ÇóÏÂÒ»²½ - C/C++ / CÓïÑÔ

ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë 
Äã²»Àí½âÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ