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

Ò»¸ömysqlµÄ´æ´¢¹ý³Ì£¬ÄÄÀïÓÐÎÊÌ⣿

SQL code:

create procedure(in w varchar(20),out c int)
begin
set @sqlcount=concat('select count(*) into @c from scms_product where ',w);
prepare stm1 from @sqlcount;
execute stm1;
set c=@c;
set @sql=concat('select * from scms_product where ',w);
prepare stm2 from @sql;
execute stm2;
end


ÉÏÃæµÄ´æ´¢¹ý³ÌÔÚmysqlÀïÔËÐÐÕý³££¬ÒªÇóÔÚphpÀïµÃµ½out±äÁ¿cµÄÖµ£¬php´úÂëÊÇÕâÑùµÄ
PHP code:

$rs=$mysqli->query("call p5('cateid=5',@c)");
$res=$mysqli->query("select @c");
$row=$res->fetch_row();
echo $row[0];


ÔËÐеÄʱºò¾Í»á³öÏÖ´íÎóÌáʾ£¬Call to a member function fetch_row() on a non-object  Èç¹ûÎÒÈ¥µô´æ´¢¹ý³ÌÖеÄ
set @sql=concat('select * from scms_product where ',w);
prepare stm2 from @sql;
execute stm2;
Õ⼸ÐоÍÕý³£ÁË£¬ÇëÎÊÎÒµÄphp³ÌÐò¸ÃÔõôд£¿{{--


Ïà¹ØÎÊ´ð£º

ΪʲôMySQL²»Ö§³ÖÖÐÎİ¡£¿£¿

ÈçÌ⣬MySQL²»»áÕâÑù°É
Ö§³Ö£¬Ä㽨Á¢Êý¾Ý¿âµÄʱºòÖ¸¶¨×Ö·û¼¯utf8»òÕßgbk¾ÍÐÐÁË¡£

http://blog.csdn.net/ACMAIN_CHM/archive/2009/05/12/4174186.aspx
MySQL ÖÐÎÄÏÔʾÂÒÂë

Ö§³Ö£¬¼ì²é×Ö·û¼¯ÉèÖÃ

Ö§³Ö£¬¼ì² ......

MYSQL character_set_server Ôõô¸Ä

ÎÒ¿ª·¢ASP.netʱ 
²åÈëÍâÎÄÂÒÂë 
SHOW VARIABLES LIKE 'character%';
Õâ¸öʱºò
character_set_client utf8 
character_set_connection utf8 
character_set_database utf8 
ch ......

MySQL´íÎó - PHP / »ù´¡±à³Ì

ÎÒ°²×°µÄÕâ¸öÈí¼þVertrigoServ£¬ÔÚwindows7ÖÐÔËÐУ¬Í¼±ê¼ÓºÅΪÀ¶É«£¬±¨MySQLµÄ´íÎó£¬Çë½Ì¸÷λ¸ßÊÖ¸ÃÔõÑù¸ü¸Ä¡£Ð»Ð»¸÷λ£¡
mysql ·þÎñÊÇ·ñÆðÀ´ÁË£¿

ûÓУ¬±¨µÄÊǶ˿ڴíÎó£¬ÔÚÅäÖÃÎļþµ±ÖиÄÁË£¬Ò²²»ÐÐ

¿ÉÒÔÓÃÈ ......

eclipseÁ¬½ÓmysqlÊý¾Ý¿â - Java / Eclipse

ÏÈÉÏ´íÎó
ÎÞ·¨Áª½ÓÊý¾Ý¿â
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......

mysqlÁ¬½Ótomcat - Java / Web ¿ª·¢

ÎÒÒѾ­°´Õս̳ÌÉÏÅäÖÃtomcatµÄserver.xml
<Context path = "/POS" docBase = "POS" debug = "5" reloadable = "true" crossContext = "true" workDir = &quo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ