fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
April 17, 2014, 08:02:36 PM

Login with username, password and session length
Search:     Advanced search
FMWebschool releases more educational FMStudio webinars - check them out here:
http://www.fmwebschool.com/webinars.php
27742 Posts in 6134 Topics by 1525 Members
Latest Member: alkyred
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  FMStudio
| |-+  FMStudio
| | |-+  recordset criteria
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: recordset criteria  (Read 620 times)
PhanMan
Full Member
***
Offline Offline

Posts: 140


« on: January 04, 2012, 01:43:38 PM »

i want to display a record set. 

Code:
<?php

$task_find 
$IT_task->newFindCommand('task_instances');
$task_findCriterions = array('current_year'=>'='.$task_row->getField('completion_year'),);
foreach(
$task_findCriterions as $key=>$value) {
    
$task_find->AddFindCriterion($key,$value);
}

fmsSetPage($task_find,'task',50); 
?>

I want to display any record that the current_year field = completion_year field.  these fields have the yyyy format.  somehow my code is not working.. any suggestions? thanks
Logged
Whoosah
Jr. Member
**
Offline Offline

Posts: 71
Kudos: 100



Applications:
« Reply #1 on: January 05, 2012, 10:25:02 AM »

Hi PhnMn!

I think you need to use "==" double equal in order for this to work!

/Heine
Logged
PhanMan
Full Member
***
Offline Offline

Posts: 140


« Reply #2 on: January 05, 2012, 10:41:34 AM »

i figured it out by browsing around this forum.

Code:

<?php

$this_year 
date("Y");

$task_done_find $IT_task->newFindCommand('task_instances');
$task_done_findCriterions = array('task_id'=>'*','type'=>'Annual','completion_year'=>'=='.$this_year,);
foreach(
$task_done_findCriterions as $key=>$value) {
    
$task_done_find->AddFindCriterion($key,$value);
}

fmsSetPage($task_done_find,'task_done',50); 
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!