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.

codeigniter - Calling same model function with different parameters not returning values -


soooo....long time reader first time poster. first time, can't find answer!

i've got model returns array of results (working). loop through results foreach , append array additional values second function in model. problem first of several function calls return results. function get_offering_total() returns value first listed call (cash). returning correct value, subsequent attempts use same function returns nothing. var_dump shows array structured correctly on output, values null. there issue calling same model method different parameters? needs cleared/reset?

here's code...

//$data['offerings'] stores results first query

foreach( $data['offerings'] $key => $value ) {

//set filters

$cash_filter = array( 'method' => '5' ); $checks_filter = array( 'method' => '6' );

//get totals

$data['offerings'][$key]['cash'] = $this->model_records->get_offering_total( $value['offering_id'], $cash_filter); $data['offerings'][$key]['checks'] = $this->model_records->get_offering_total( $value['offering_id'], $checks_filter);

...other stuff... }

thanks help!

here's simple test see if code wrote correct. surround in function (in model) within try/catch block, , see if throws kind of exception. you'd surprised how many exceptions thrown php doesn't show them because have error reporting off in php config. can same 2 lines on call method in controller , see if good.

php exceptions reference


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 -