[H-GEN] Mysql & bitwise xor
Paul Clarke
paul at sitedynamics.com.au
Mon Nov 17 04:07:11 EST 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Thanks for the info re this. It would seem that there are a lot of
version 3.xx's out there are standard builds. My home box is a Debian
build, and I presume that I installed mysql using apt-get install and
requesting version 3. My server on rackshack also is installed with
version 3 (so there is not much point upgrading my development box).
So, the next question is what is the logic needed to do an xor using
only &, |, and ~ (and, or, and not)? Or will it be easier to do the
calculation in php and writhing the result back?
Thanks
Paul
-----Original Message-----
From: Majordomo [mailto:majordom at caliburn.humbug.org.au] On Behalf Of
Paul Clarke
Sent: Monday, 17 November 2003 6:14 AM
To: general at lists.humbug.org.au
Subject: [H-GEN] Mysql & bitwise xor
[ Humbug *General* list - semi-serious discussions about Humbug and
]
[ Unix-related topics. Posts from non-subscribed addresses will vanish.
]
Hi all,
Is it just me or does mysql not like a bitwise xor
The query:
update user set groups=groups ^ 2 where login="pmcleod"
Returns ... You have an error in your SQL syntax near '^ 2 where
login="pmcleod"' at line 1
However both the following work fine:
update user set groups=groups & 2 where login="pmcleod" // and update
user set groups=groups | 2 where login="pmcleod" // or
Any ideas, is there something really simple that I am missing?
I am running MySQL 3.23.49
Thanks
Paul
Site Dynamics - Paul Clarke
paul at sitedynamics.com.au
0414 367 747
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au
.
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list