magento ÔÚMagentoÖлñÈ¡SQLÓï¾ä
MagentoÊÇÔÚZend FrameworkµÄ»ù´¡Éϴ¶øÀ´£¬ÓÐÁ½ÖÖ·½Ê½¿ÉÒÔ´ÓMagentoµÄcollection»ñµÃÕæÕýµÄSQLÓï¾ä¡£
ÒÔ Mage::getResourceModel('reports/product_collection') ΪÀý£º
1
$collection=Mage::getResourceModel('reports/product_collection');
$collection->printlogquery(true);
2
$collection=Mage::getResourceModel('reports/product_collection');
$query=$collection->getSelectSql(true);
echo $query;
¿ÉÒÔ¿´µ½Í¬ÑùµÄÊä³ö½á¹û
SELECT `e`.* from `catalog_product_entity` AS `e`
Ïà¹ØÎĵµ£º
SQL Server£º´æ´¢Í¼ÏñºÍBLOBÎļþ(Ò»)
×÷ÕߣºØýÃû ÎÄÕÂÀ´Ô´£ºOnegreen.Net ä¯ÀÀ´ÎÊý£º2559 ¸üÐÂʱ¼ä£º2008-5-25 23:16:09
¡¡¡¡Ê²Ã´ÊÇBLOB
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÀ´±È½ÏÁ½ÖÖÎļþÀàÐÍASCIIºÍ¶þ½øÖÆ¡£´æ´¢ÔÚSQL ServerÖеĴ󲿷ÖÊý¾ÝÖµ¶¼ÊÇÓÉASCII(ÃÀ¹úÐÅÏ¢½»»»±ê×¼´úÂë)×Ö·û×é³É¡£¼òµ¥ËµÀ´£¬ASCII×Ö·û¾ÍÊÇÄܹ»ÔÚ¼ ......
ÎÊÌâ: һ̨·þÎñÆ÷ÉÏÔËÐÐÁËSQL Server,SQL Server Agent,Distributed Transaction,CoordinatorÕâÈý¸ö·þÎñ£¬ÇëÎÊÕą̂·þÎñÆ÷ÊÇһ̨ʲôÑùµÄ·þÎñÆ÷£¿ÕâÈý¸ö·þÎñ¾ßÌåÓÐʲô×÷Óã¿
ÕâÊÇһ̨Êý¾Ý¿â·þÎñÆ÷.
SQL Server ÕâÊÇÖ÷Êý¾Ý¿â·þÎñ£¬¶øÇÒÐγÉÁËSQL ServerµÄÖ§Öù¡£ËüÓÃÓÚ´æ´¢ºÍÌáÈ¡Êý¾Ý¡£
SQL Server Agent Ò²½ÐSQL Server´ú ......
Õâ¸öÂß¼¹ØÏµÕ§¿´ÆðÀ´±È½Ï¸´ÔÓ£¬ÅªÇå³þÁ˾ͺã¡
ÓÐÁ½¸ö±í£¬
student(
id,
name,
primary key (id)
);
studentInfo(
id,
age,
address,
foreign key(id) references outTable(id) on delete cascade on update cascade
);
µ±ÎÒÃÇɾ³ýstudent±íµÄʱºò×ÔȻϣÍûstudentInfoÀïµÄÏà¹ØÐÅÏ¢Ò²±»É¾³ý£¬Õâ¾ÍÊÇÍâ¼üÆð×÷Óà ......
select a.ClassName,a.CourseName,sum(²»¼°¸ñ) as ²»¼°¸ñ,sum(²î) as ²î,sum(ÖеÈ) as ÖеÈ,sum(ºÃ) as ºÃ ,sum(²»¼°¸ñ)+sum(²î)+sum(ÖеÈ)+sum(ºÃ) as °à¼¶×ÜÈËÊý from (select StudentID,ClassName,CourseName,1 as ²»¼°¸ñ,0 as ²î,0 as ÖеÈ,0 as ºÃ from StudentScore where ScoreRemark='fail' union all
select Stu ......
±¾ÎÄת×Ô£ºhttp://industry.ccidnet.com/art/1106/20070514/1080519_1.html
±¾ÎÄÊÇSQL Server SQLÓï¾äÓÅ»¯ÏµÁÐÎÄÕµĵÚһƪ¡£¸ÃϵÁÐÎÄÕÂÃèÊöÁËÔÚMicosoft’s SQLServer2000¹ØÏµÊý¾Ý¿â¹ÜÀíϵͳÖÐÓÅ»¯SELECTÓï¾äµÄ»ù±¾¼¼ÇÉ£¬ÎÒÃÇÌÖÂ۵ļ¼ÇÉ¿ÉÔÚMicrosoft's SQL Enterprise Manager»ò Microsoft SQL Query Anal ......