我正在处理一个php脚本,该脚本获取fields数据库中字段的值。我现在想要完成的是如何编辑/更新每个字段的字段值,使之成为新值,并且应该保存在Fil怪人数据库中。这是我获取字段的代码:
require_once ('../../FileMaker.php');
$fm = new FileMaker('dataStest.fp7', 'https://secure.smartdecision.org', 'web', 'webtest');
$findCommand = $fm->newFindCommand('List');
$findCommand->addFindCriterion('ID1',$ftype);
$result = $findCommand->execute();
$records = $result->getRecords();
foreach ($records as $record) {
if ($record->getField('ID3') == "ACTIVE" && $record->getField('ftyCat') == "treatment") {
echo $record->getField('d15'). '<br>';
}
If(FileMaker::isError($result)){
echo "Could not connect to the field";
}
任何建议都会很有帮助。谢谢!
发布于 2014-07-21 01:33:05
您只需使用setField
方法,如FileMaker PHP中所记录的(以下是FileMaker_Record
类文档的页面),然后将记录提交给commit
...
$record->setField('d15', 'new value');
$record->commit();
...
https://stackoverflow.com/questions/24730657
复制相似问题