Search code examples
md5phalcon

I want to match md5 value with table column like md5(id) = $id in phalcon


I am getting stuck with matching md5 value with table column and can't find even phalcon document.

if have md5 encrypted value that i want to match with table id(int) column.


Solution

  • if you have db column encrypted in md5 like you stored your password in md5 then you can do

    $password="abc";
    $phql = "SELECT * FROM users where password=:password:";
    $result= $app->modelsManager->executeQuery($phql,array('password'=>md5($password));