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

mysqlÔ¤´¦Àí - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

SQL code:

create procedure proc_batchUpdate(in categoryId integer , in artIds varchar(50))
begin
set @dsql = count('update article set type=' , categoryId , ' where id in (' , artIds , ')') ;
prepare s1 from @dsql;
execute s1;
end;



ÎÒÖ´ÐÐÕâ¸ö±¨´í£¬ÒªÔõô¸Ä°¡£¿
¼ì²éһϠ@dsql; µÄÄÚÈÝÊÇʲô¡£ ¹À¼ÆÄãµÄÕâ¸ö¶¯Ì¬µÄSQLÓï¾äÓï·¨´íÎó¡£

ÿÌì»ØÌû¼´¿É»ñµÃ10·Ö¿ÉÓ÷֣¡

ÒýÓÃ
SQL code

create procedure proc_batchUpdate(in categoryId integer , in artIds varchar(50))
begin
set @dsql = count('update article set type=' , categoryId , ' where id in (' , artIds , ')') ;¡­¡­


ÕâÀï±ßµÄcountÊÇʲôÒâ˼£¿ ²»ÊÇconcatÖ®ÀàµÄÂð£¿



Ïà¹ØÎÊ´ð£º

mysqlÎÊÌ⣡ - Java / Java SE

String sqlCount="select count(*) from usertable where username='"+
userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡
Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ
select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......

MYSQLµ÷¶ÈµÄÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ


3̨µçÄÔ£¬ÆäÖÐһ̨×÷ΪMYSQL·þÎñÆ÷£¬ÁíÍâ2̨ΪTOMCAT·þÎñÆ÷¡£
MYSQL·þÎñÆ÷ÀïÓÐÒ»Ìõ¼Ç¼£¬ IDΪ10.
ÏÖÔÚ2̨TOMCATͬʱ£¨100%£©·¢ÆðÐÞ¸ÄMYSQLÀïIDΪ10µÄÄÇÌõ¼Ç¼£¬±ÈÈçÐ޸ĴËID¼Ç¼ÀïijһÏîµÄÄÚÈÝ¡£ ±ÈÈçTOMCAT 1Ò ......

ASPÁ¬½ÓMySQLÊý¾Ý¿âµÄÎÊÌâ

ͨ¹ýODBCÁ¬½ÓMySQLÊý¾Ý¿â£¬Á¬½Ó³É¹¦£¬µ«²»ÄܲéѯÊý¾Ý£¬²»ÖªµÀΪʲô
'Á¬½ÓmysqlÊý¾Ý¿â
str = "dsn=test;driver={MySQL odbc 3.51 Driver};server=localhost;port=3306;uid=root;pwd=;database=officesyst ......

sqlÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

ÔõôÑù²éѯÁ¬½Ó2¸ö±íÖ®ºó µÃ³öµÄбí
ÀýÈç A±í£º·¢¼þÈËID Óʼþ±àºÅ ÓʼþÄÚÈÝ ÊÕ¼þÈËID ·¢¼þʱ¼ä
  B±í£ºÊÕ¼þÈËID Óʼþ±àºÅ ÊÕ¼þʱ¼ä
  Ê×ÏÈ×öA BµÄÁ¬½Ó²éѯ ¼´ Óʼþ±àºÅÏàµÈ
  ²é³ö£ ......

PHP+MYSQLÊý¾Ý¼¯´¦Àí - PHP / »ù´¡±à³Ì

1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ