Re: function use in sql -- md5

From: Date: Wed, 15 Nov 2000 04:35:28 +0000
Subject: Re: function use in sql -- md5
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25354@lists.php.net to get a copy of this message
On Wed, 15 Nov 2000, Philip Olson wrote: > Hey David- > > I try to test this and : > > mysql> UPDATE toc SET description = MD5(description); > ERROR 1064: You have an error in your SQL syntax near '(description)' at > line 1 > mysql> > > in this case : > > table = toc > column = description > > Thoughts? It _seems_ this is correct logic (btw, i meant update table > before) but strangly it does not do as expected. Does mysql command line > allow for md5? I thought it does but now am not sure as I see it in > docs yet ... so i will use php right now ... > > > Philip Could be your version of mysql doesn't support MD5? Works for me - note the version: ~$ mysql test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15465 to server version: 3.23.12c-alpha Type 'help' for help. mysql> update test set description = md5(description); Query OK, 4 rows affected (0.00 sec) Rows matched: 4 Changed: 4 Warnings: 4 mysql> select * from test; +-------------+ | description | +-------------+ | f97c5d2994 | | b8a9f715db | | 35d6d33467 | | 8cbad96ace | +-------------+ 4 rows in set (0.00 sec) -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#25354) next »