Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // contoh kod
- // $dbh is the handle of pdo object
- $stmt = $dbh->prepare("SELECT * FROM data_pungutan ORDER BY created_at DESC");
- $stmt->execute();
- $result = $stmt->fetchAll();
- $teks = array();
- // hanya nak certain column shj
- foreach ($result as $row) {
- $teks[] = $row['teks'];
- }
- $teks = implode(PHP_EOL, $teks);
- // ok, bila echo teks utk send output to browser, kalau size besar, 250k ke atas, execution time jd slow
- // kalau tk echo, laju je...
- echo $teks;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement