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 - checking database for necessary updates using dateDiff -


hey stackoverflowers. im having few problems code have written check database on refresh if record dates on database between specified $min , $max values. if not record updated. have done far.

// check database necessary updates      $update = mysql_query("select * rent");      while($row = mysql_fetch_array( $update )) {      $datetime_lower   = datetime::createfromformat('d/m/y', $min);     $datetime_upper   = datetime::createfromformat('d/m/y', $max);     $datetime_compare = datetime::createfromformat('d/m/y g:i a', $row_update['pdate']);      $diff_lower = $datetime_lower->diff($datetime_compare);     $diff_upper = $datetime_upper->diff($datetime_compare);      if ($datetime_lower < $datetime_compare && $datetime_upper > $datetime_compare) {         // date between min , max, nothing     } else {         // date not between min , max, update cell colour $result = mysql_query("update rent set colour='f0f0f0' $datetime_lower < $pdate && $datetime_upper > $pdate") or die(mysql_error());         }     } 

the logic behind seems rather rational whenever try run code error message:

warning: datetime::diff() expects parameter 1 datetime, boolean given in c:\xampp\htdocs\keypad\main.php on line 41  warning: datetime::diff() expects parameter 1 datetime, boolean given in c:\xampp\htdocs\keypad\main.php on line 42 

any idea whats going on?

  1. fetching $row using $row_update
  2. update rent set colour='f0f0f0' update records if 1 tupel not between $min , $max
  3. why not update rent set colour='f0f0f0' pdate not between $min , $max mysql between

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 -