|
ฟังคำเทศนา-อบรม
วันที่ |
หัวข้อ |
ข้อพระคัมภีร์ |
โดย |
try {
$dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass);
$dbh->query('SET NAMES utf8');
foreach ($dbh->query('SELECT COUNT(*) FROM teach WHERE visible = 1') as $row) {
$countx = $row[0];
}
$Paging = CalculatePaging($countx, $pPage, $ItemPerPage);
$FirstRow = $Paging[FirstRow];
$strSQL = "SELECT TeachID,
Topic,
TeachDate,
spk.Name as Name,
spk.ImageFilename as ImageFilename,
Scripture,
Detail,
AudioFilename
FROM teach as tch INNER JOIN speaker as spk ON spk.SpeakerID = tch.SpeakerID
WHERE visible = 1
ORDER BY TeachDate DESC
LIMIT $FirstRow,$ItemPerPage"; // $dtbResult = $dbh->prepare('CALL stpTeach(0)');
$dtbResult = $dbh->prepare($strSQL);
$dtbResult->execute();
while($row=$dtbResult->fetch(PDO::FETCH_BOTH)) {
?>
| | |