我有CodeIgniter和Cake PHP的项目经验.但是现在我需要处理一个两个都不合适的大项目.我几乎决定使用symfony 1.4(根据我客户的要求,2.0不是一个选项).
在Symfony 1.4中,我在ORM选择:Doctrine或Propel之间感到困惑?我经历了几个链接.迄今为止最好的是 PHP ORM:Doctrine vs. Propel.
然而,所有这些比较似乎至少有两年的历史,而且世界肯定会发生很大变化.我对编码风格没有任何问题; 我对所有Active Record,Criteria,DQL或其他什么都很好.对我来说,性能最重要的是编码风格.我主要关注处理大量数据时的性能,可能是来自集群数据库下多个表的数百万行.不幸的是,目前我的经验还不足以对此事作出独立决定.
任何人都可以在Symfony 1.4下了解Propel/Doctrine的性能吗?除了性能之外,还有其他值得注意的因素(编码风格除外),选择PHP ORM时应该注意哪些因素?
我知道我可能做错了什么.任何人都可以请指出为什么我作为对象获得顶级?
$(document).ready(function(){
topwithpx='0px';
alert(topwithpx);
topstr=topwithpx.substr(0,topwithpx.length-2);
alert(topstr);
top=parseInt(topstr);
alert(top);
});?
Run Code Online (Sandbox Code Playgroud)
全部谢谢:'top'是保留关键字(Window.top).我的错.接受第一个ans.快速回复所有+1.
问题:我有一个固定宽度但未知(自动)高度的盒子(div).
我需要使用JQuery动画功能打开/关闭该框.
问题是(在代码中也注释)在Open事件中,我需要设置自动高度,这是我无法做到的.有人可以帮助设置高度自动?
JSFiddle:http://jsfiddle.net/7m5Qa/ 代码如下:
HTML
<button id="open">open</button>
<button id="close">close</button>
<div id="textselector-body">
a<br/>
b<br/>
c<br/>
</div>?
Run Code Online (Sandbox Code Playgroud)
Java脚本
$(document).ready(function(){
$("#open").click(function(){
$("#textselector-body").animate({
height:'100px' //here is problem. I need it 'auto'.
},2000);
});
$("#close").click(function(){
$("#textselector-body").animate({
height:'0'
},2000);
});
});?
Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的查询中添加以下条件
AND momento_distribution.MOMENTO_IDMEMBER IN ( 5, 1, 3, 10, 11, 12, 18, 32, 51, 6 )
Run Code Online (Sandbox Code Playgroud)
为此,我有以下代码
$friendCsv=Friend::getFriendIdAsCsv($member); //returning string 5, 1, 3, 10, 11, 12, 18, 32, 51, 6
//code
$c->add(MomentoDistributionPeer::MOMENTO_IDMEMBER, $friendCsv, Criteria::IN);
Run Code Online (Sandbox Code Playgroud)
查询失败,因为它正在生成
AND momento_distribution.MOMENTO_IDMEMBER IN ( '5, 1, 3, 10, 11, 12, 18, 32, 51, 6' )
Run Code Online (Sandbox Code Playgroud)
在字符串上添加单引号.如果我手动删除该单引号,查询将成功运行.
有没有办法强制推动不要将单引号放在值中?