本文整理汇总了PHP中Projects::setCustomerId方法的典型用法代码示例。如果您正苦于以下问题:PHP Projects::setCustomerId方法的具体用法?PHP Projects::setCustomerId怎么用?PHP Projects::setCustomerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projects
的用法示例。
在下文中一共展示了Projects::setCustomerId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: projectObjArr
/**
* Build the project object array from the given result set
*
* @param resource $result Result set from the database
* @return array Array of Project objects
*/
public static function projectObjArr($result)
{
$objArr = null;
while ($row = mysql_fetch_assoc($result)) {
$tmpcusArr = new Projects();
$tmpcusArr->setProjectId($row[self::PROJECT_DB_FIELD_PROJECT_ID]);
$tmpcusArr->setCustomerId($row[self::PROJECT_DB_FIELD_CUSTOMER_ID]);
$tmpcusArr->setProjectName($row[self::PROJECT_DB_FIELD_NAME]);
$tmpcusArr->setProjectDescription($row[self::PROJECT_DB_FIELD_DESCRIPTION]);
$tmpcusArr->setDeleted($row[self::PROJECT_DB_FIELD_DELETED]);
$objArr[] = $tmpcusArr;
}
return $objArr;
}
示例2: fetchCustomersProjects
public function fetchCustomersProjects($customerId = 0)
{
$projectObj = new Projects();
if ($customerId != 0) {
$projectObj->setCustomerId($customerId);
}
$projectObj->setDeleted(Projects::PROJECT_NOT_DELETED);
$projects = $projectObj->fetchProjects();
$projectArr = null;
if (isset($projects)) {
foreach ($projects as $project) {
$tmpArr[0] = $project->getProjectId();
$tmpArr[1] = $project->getProjectName();
$projectArr[] = $tmpArr;
}
}
return $projectArr;
}