我被困在一个我正在帮助的大型项目中 - 我们有一个FileMaker数据库,并且为它创建了一个在线目录。最初我们只穿了衣服,它运作得很好,但现在我们也添加了其他收藏。我正在努力制作下面显示的“C”(服装)系列,但它不起作用。我是FileMaker api的新手,非常感谢。用Filemaker api分隔类别/ php
<?php
/*the function that displays the buttons (the img) of each dress to link to the details page*/
function displayRecords($records){
/*TO DO*/
foreach ($records as $record){
$photo = $record->getField("Photo");
$thumbnail = $record->getField("Thumbnail");
$date = $record->getField("Date CR");
$tNum = $record->getField("Catalog_Number");
$category = $record->getField("Collection");
if ($category = "C"){
echo ("<div class=\"dimg\">");
echo ("<a href = \"http://fadma.edu/historicalcollection/museum/details_test_textiles.php?id=");
echo($tNum);
echo ("\">");
echo ("<img src= \" ");
echo ($thumbnail);
echo (" \"></a>");
echo ("<div class=\"desc\">");
echo ($date);
echo ("</div></div>");}
}
}
$begin = (int)$_GET["begin"];
$end = (int)$_GET["end"];
for ($x = $begin; $x <= $end; $x++){
$findCommand = $fm->newFindCommand("Listing");
$findCommand->addFindCriterion("Photo", "*");
$findCommand->addFindCriterion("Date CR", $x);
$result = $findCommand->execute();
if(FileMaker::isError($result)){
continue;
}
$records = $result->getRecords();
displayRecords($records);
}
?>
有没有具体的错误? –
不幸的是,不,只是一个404。双==做到了!多么愚蠢的事情要忘记。 – chauxvive