Welcome Guest, Not a member yet? Register   Sign In
Datamapper ORM and MySQL AES_ENCRYPT and AES_DECRYPT
#1

[eluser]Unknown[/eluser]
Hi,

Does anyone have any experience of using the MySQL encryption functions (AES_ENCRYPT and AES_DECRYPT) to save and get models in Datamapper ORM?

Any help and/or examples are greatly appreciated.

Bob
#2

[eluser]WanWizard[/eluser]
These are MySQL functions like any other, and as such not a problem for DM: http://datamapper.wanwizard.eu/pages/functions.html
#3

[eluser]Unknown[/eluser]
Hi,

thanks for your prompt response. I have read that page about sql functions but do not seem to be having much luck and i'm sure it is just a basic syntax error.

I want to encrypt the value for $d->suppier and have tried the following amongst other things:

Code:
$d = new Deal();
   $d->supplier = $d->func('AES_ENCRYPT','Item To Encrypt', '@897sdn9j98u98jk');
   $d->save();

Can you point me i the right direction?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB