Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - zend based where clause disappearing -


i have weird problem using socialengine db class (based on zend framework). wrote this:

$statustable = engine_api::_()->getdbtable('actions', 'activity'); $myposts = $statustable->fetchall($statustable->select()     ->where('subject_id = ?',$id)     ->where('comment_count > ?',0)     ->where('type = ?',$type)     ->where('date > ?',$newer_than)     ->order('date desc')     ->limit(intval($num_items))); 

its part of plugin made, problem query generated somthing this:

select `engine4_activity_actions`.* `engine4_activity_actions` (subject_id = 5) , (comment_count > 0) , (type = ) , (date > ) order `date` desc limit 10 

you can see $type , $newer_than have disappeared, though have values ($type='status', $newer_than='01/01/2000')

edit: seems respond integers , not strings, if replace 'status' 0 shows in query.

the server runs on php 5.3.2

there's third optionnal argument on where() method type of argument. depending on db adapter can maybe important thing tell zend_db_select query builder. try

->where('subject_id=?',$subject,'text') 

zf api indicates "note more correct use named bindings in queries values other strings", can query builder, real type of args, try way:

$myposts = $statustable->fetchall($statustable->select() ->where('subject_id=:psubject') (...) ,array('psubject'=>$subject)); 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -