Created
February 7, 2012 00:08
-
-
Save onpubcom/1756067 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// See the following OnpubAPI tutorial for more info: | |
// http://onpubco.com/index.php?articleID=76§ionID=2 | |
// Establish the connection to the Onpub database. | |
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" ); | |
// Include the OnpubAPI classes. | |
include 'onpub/api/onpubapi.php'; | |
// Construct an OnpubArticles object. This represents the OnpubArticles table | |
// in the database. | |
$oarticles = new OnpubArticles($pdo); | |
// Output the number of articles currently stored in the database. | |
echo $oarticles->count(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment