PHP 8.5.0 Alpha 4 available for testing

Voting

: max(five, one)?
(Example: nine)

The Note You're Voting On

seanferd at assmasterdonkeyranch dot com
18 years ago
This is an excellent method for returning a column count. For example:

<?php
$db
= new PDO('mysql:host=localhost;dbname=pictures','user','password');
$pics = $db->query('SELECT COUNT(id) FROM pics');
$this->totalpics = $pics->fetchColumn();
$db = null;
?>
In my case $pics->fetchColumn() returns 641 because that is how many pictures I have in my db.

<< Back to user notes page

To Top