Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Fetching scaler value

How can I fetch a scaler value from DB. Using following return Fatal error: Undefined class constant 'FETCH_COLUMN' in... error.

$this->di['db']->fetchOne('select * from user where username=:username and password=:password', Phalcon\Db::FETCH_COLUMN,
                ['username' => $request['username'], 'password' => $request['password']]);


32.7k

Namespace problem maybe ?

\Phalcon\Db::FETCH_COLUMN


12.6k
edited Jan '15

@Calin No, the FETCH_* constants work correctly.



12.6k
Accepted
answer
edited Jan '15

Upgradiing to 1.3 from 1.2, now it recoginse that mode.