本文整理汇总了PHP中DataSource::getUserReviews方法的典型用法代码示例。如果您正苦于以下问题:PHP DataSource::getUserReviews方法的具体用法?PHP DataSource::getUserReviews怎么用?PHP DataSource::getUserReviews使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSource
的用法示例。
在下文中一共展示了DataSource::getUserReviews方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phpversion
$message .= "</tr>";
$message .= "</table>";
$message .= "<br/>";
$message .= "<p><b>Message:</b></p>";
$message .= "<p>{$_POST["emailmessage"]}</p>";
$message .= "</body></html>";
$headers = "From: {$from}\n";
$headers .= "Reply-To: {$from}\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\n";
$headers .= "MINE-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1";
mail($to, $subject, $message, $headers);
}
}
// get the review results for this seller to display
$reviewResult = DataSource::getUserReviews($seller);
$reviews = array();
if ($reviewResult) {
while ($review = $reviewResult->fetch_assoc()) {
$reviews[] = $review["reviewDescription"];
}
}
} else {
redirectTo("items.php");
}
closeConnection();
?>
<main>
<div id="contactinfo">
<div class="container">
示例2: escapeValue
$phoneNumber = escapeValue(trim($_POST["phone"]));
$emailAddress = escapeValue(trim($_POST["email"]));
DataSource::updateUser($username, $firstName, $lastName, $emailAddress, $phoneNumber);
// else get current information about the username in the
// database to display
} else {
$result = DataSource::getUser("username = '{$username}'");
$row = $result->fetch_assoc();
$firstName = $row["firstName"];
$lastName = $row["lastName"];
$emailAddress = $row["emailAddress"];
$phoneNumber = $row["phoneNumber"];
}
// get the reviews for the username from the database to
// display
$reviewResult = DataSource::getUserReviews($username);
$reviews = array();
if ($reviewResult) {
while ($review = $reviewResult->fetch_assoc()) {
$reviews[] = $review["reviewDescription"];
}
}
} else {
redirectTo("myitems.php");
}
}
?>
<main>
<div id="myinfoform">