I am working with a MySQL database and I am hoping someone can help me out with this.
CREATE TABLE CLASS ( CID int(22) NOT NULL auto_increment, LOC int(11) default NULL, CLI int(8) NOT NULL default '0', TYPE tinyint(4) NOT NULL default '0', STATUS char(3) NOT NULL default '', UID int(22) NOT NULL); CREATE TABLE GROUP ( GRID int(11) NOT NULL auto_increment, NAME varchar(40) NOT NULL default '', MAXACT int(11) NOT NULL default '0', LEVEL int(11) NOT NULL default '0', ADMIN int(22) NOT NULL default ''); Now I need to update the class table: set the CLASS.UID field to the `GROUP`.ADMIN field (join them on CLASS.CLI=`GROUP`.GRID) if CLASS.UID=2 and `GROUP`.GRID<>1. What would that SQL syntax look like? Thanks SK --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php