UPDATE register, sessions SET register.privatedata=%s WHERE register.sid=%s AND sessions.exp>%s

UPDATE register, sessions SET register.privatedata=%s WHERE register.sid=%s AND sessions.exp>%s

Post by gert » Fri, 28 Mar 2008 03:24:33


I want to update privatedata with has a specific session id that is
not expired

Now i came up with this update statement but i am not sure if it will
update other privatedata's as wel that are not expired ? Normaly i
would use GROUP BY register.sid in a select statement but that doesn't
work in a update statement.

UPDATE register, sessions SET register.privatedata=%s WHERE
register.sid=%s AND sessions.exp>%s

CREATE TABLE `sessions` (
`SID` varchar(64) NOT NULL,
`EXP` datetime DEFAULT NULL,
PRIMARY KEY (`SID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `register` (
`UID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`GID` bigint(20) unsigned DEFAULT '0',
`SID` varchar(64) DEFAULT NULL,
`privatedata` varchar(64) DEFAULT NULL,
PRIMARY KEY (`UID`),
UNIQUE KEY `UID` (`UID`),
UNIQUE KEY `SID` (`SID`),
KEY `SID_2` (`SID`),
CONSTRAINT `register_ibfk_1` FOREIGN KEY (`SID`) REFERENCES
`sessions` (`SID`)
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8
 
 
 

1. Should the Microsoft update downloads register kb's or mb's in the programs list,becausenone of the down loads I have been given have registered any ....s's.

2. [ISE7.1] Equivalent register removal + register duplication + register balancing

Hey,

When all of these options (equivalent_register_removal +
register_duplication + register_balancing) are enabled, they all work
fine and do what they are supposed to do ... but because i don't want
it to remove the equivalent registers, i disabled this option but now
because of disabling equivalen_register_removal both
register_duplication and register_balancing don't do anything anymore?
... are all of these features heavily related to each other????

thanks in advance for your reply,

kind regards,

Tim Verstraete

3. My Documents redirection error "%s's Documents"

4. reference to two o/s's on startup

5. Support for Multiple Boot O/S's

6. O.T. - M/s's latest OS.

7. Z's instead of S's on Borland UK

8. Can I in-place upgrade guest o/s's?

9. Multiple problems, multiple O/S's & 2 different word processors Of

10. 6 S's of Capable Home Robots

11. Difference between O/S's

12. Sound card installs w 2 o/s's

13. 16-BIT APPLICATIONS RUN ON 32-BIT O/S's....CONFLICT OR HARMONY?

14. 2 O/S's by accident?

15. What PDA's have O/S's that will sync w/Outlook Business Contacts?