prepare($sql);
//Execute the query:
$query->execute();
//Assign the data which you pulled from the database (in the preceding step) to a variable.
$results=$query->fetchAll(PDO::FETCH_OBJ);
// For serial number initialization
$cnt=1;
if($query->rowCount() > 0)
{
//In case that the query returned at least one record, we can echo the records within a foreach loop:
foreach($results as $result)
{
?>
About
Dr Steve Abuchi Ezenwagu Educational is a place where youu will find quality educational materials for oth commercial and non commercial use. You are encouraed to share your articles, post yor free and paid books for our esteemed users to buy.