For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2004 > Updating MySQL record









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Updating MySQL record
Dag Eilertsen

2004-08-30, 3:56 am

Hi!
I'm heaving a small problem updating a record containing an encrypted
password. I'm using aes_encrypt.

This is my suggestion for the query (that obviously doesn't work very well):

$sql_update = "UPDATE $Tabell SET
fornavn = \"$for_navn\",
etternavn = \"$etter_navn\",
brukernavn = \"$bruker_navn\",
passord = aes_encrypt(\"$pass_ord\")
WHERE brukerid=\"$id\"";

Can anybody help me with a query that will work?

Tnx
Dag Eilertsen




Alvaro G Vicario

2004-08-30, 3:56 am

*** Dag Eilertsen wrote/escribió (Mon, 30 Aug 2004 04:56:24 +0200):
> I'm heaving a small problem updating a record containing an encrypted
> password. I'm using aes_encrypt.


Have you checked whether AES_ENCRYPT() works in your MySQL server?

"AES_ENCRYPT() and AES_DECRYPT() were added in MySQL 4.0.2, and can be
considered the most cryptographically secure encryption functions currently
available in MySQL."



--
-- Álvaro G. Vicario - Burgos, Spain
-- Questions sent to my mailbox will be billed ;-)
--
Virgil Green

2004-08-31, 3:57 pm

"Dag Eilertsen" <dag.erik.eilertsen@broadpark.no> wrote in message
news:41329855$1@news.broadpark.no...
> Hi!
> I'm heaving a small problem updating a record containing an encrypted
> password. I'm using aes_encrypt.
>
> This is my suggestion for the query (that obviously doesn't work very

well):

It's far from obvious to me.

> $sql_update = "UPDATE $Tabell SET
> fornavn = \"$for_navn\",
> etternavn = \"$etter_navn\",
> brukernavn = \"$bruker_navn\",
> passord = aes_encrypt(\"$pass_ord\")
> WHERE brukerid=\"$id\"";
>
> Can anybody help me with a query that will work?


In what way did this one fail?

- Virgil


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com