public fetchOne (mixed $sqlQuery, [mixed $fetchMode], [mixed $bindParams], [mixed $bindTypes])
Returns the first row in a SQL query result
1 2 3 4 5 6 7 | //Getting first robot $robot = $connection ->fetchOne( "SELECT * FROM robots" ); print_r( $robot ); //Getting first robot with associative indexes only $robot = $connection ->fetchOne( "SELECT * FROM robots" , Phalcon\Db::FETCH_ASSOC); print_r( $robot ); |
Please login to continue.