February 23, 201510 yr I am trying to get results based from a range. I have Date_Start and Date_End which are exploded so they meet the filemaker formatting. Then I take a variable of $dateRange and get it to use those two fields mentioned above. I just get an error however of "errorCode=508&errorMsg=Invalid+value+entered+in+Find+mode" Can you see anything out of the ordinary? Thanks for your help and I appreciate your contributions on the forum. Your helping me out anyway. <?php require_once('Connections/User.php'); ?> <?php //Setup date to be in US format from AU format $date_input1 = $_REQUEST['Date_Start']; $date_array1 = explode ("/", $date_input1); $date_start = $date_array1[1]."/".$date_array1[0]."/".$date_array1[2]; //Setup date to be in US format from AU format $date_input2 = $_REQUEST['Date_End']; $date_array2 = explode ("/", $date_input2); $date_end = $date_array2[1]."/".$date_array2[0]."/".$date_array2[2]; $dateRange = $_REQUEST['date_start'].'...'.$_REQUEST['date_end']; $founduser_find = $User->newFindCommand('Users'); $founduser_findCriterions = array('Username'=>'=='.fmsEscape($_SESSION["User_tableLogin"]["user"]),); foreach($founduser_findCriterions as $key=>$value) { $founduser_find->AddFindCriterion($key,$value); } $foundflights_find = $User->newFindCommand('Flights'); $foundflights_findCriterions = array('Username'=>'=='.fmsEscape($_SESSION["User_tableLogin"]["user"]),'Date' =>$dateRange,'Aircraft_Type'=>$_REQUEST['Aircraft_Type']); foreach($foundflights_findCriterions as $key=>$value) { $foundflights_find->AddFindCriterion($key,$value); }
February 23, 201510 yr Heya Biggles, So... You've created the $date_start and $date_end variables... but not used them to create the search range. Also, you should put code inside code markers on the forum to preserve formatting (the little < > arrows above) On line 13, try: $dateRange = $date_start.'...'.$date_end;
February 24, 201510 yr Author Thank you. The other day I missed a ',' or something similar and the page wouldn't load. It took me 30 minutes later to work out my stupidity. Thanks for looking it over. Sometimes it needs someone to have fresh eyes looking at it.
Create an account or sign in to comment