File: phptricksORM/Operations/Operations.php

Recommend this page to a friend!
  Classes of mohammad anzawi  >  PHP PDO database class  >  phptricksORM/Operations/Operations.php  >  Download  
File: phptricksORM/Operations/Operations.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP PDO database class
Access databases using PDO
Author: By
Last change:
Date: 7 months ago
Size: 779 bytes
 

Contents

Class file image Download
<?php
/**
 * *
 * * please don't remove this comment block
 * *
 * * @author phptricks Team - Mohammad Anzawi
 * * @author_uri https://phptricks.org
 * * @uri https://github.com/anzawi/php-database-class
 * * @version 5.0.0
 * * @licence MIT -> https://opensource.org/licenses/MIT
 * * @package PHPtricks\Orm
 *
 */

namespace PHPtricks\Orm\Operations;

trait
Operations
{

    use
Where;
    use
Cond;
    use
parseWhere;
    use
Other;

   
/**
     * get count of rows for last select query
     *
     * @return int
     */
   
public function count()
    {
       
// var_dump($this->results());
        // return count($this->results());
       
$results = (array) $this->results();

        return isset(
$results[0]) ? count($this->_results) : 1;
    }

}


For more information send a message to info at phpclasses dot org.