Здравствуйте помогите пожалуйста есть две таблицы message_group и messages структура messages такова
INSERT INTO messages
(id
, group_hash
, from_id
, message
, date_ms
, time_ms
, is_read
) VALUES
(1, 28874, 5, 'привет', '2014-01-11', '00:10:01', 0),
Как сделать UPDATE сообщения на 1.Типа прочел пользователь.
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_hash` int(11) NOT NULL,
`from_id` int(11) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`date_ms` date NOT NULL,
`time_ms` time NOT NULL,
`is_read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=20 ;**
CREATE TABLE IF NOT EXISTS `message_group` (
`user_one` int(11) NOT NULL,
`user_two` int(11) NOT NULL,
`hash` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
messages
(id
int(11) NOT NULL AUTO_INCREMENT,group_hash
int(11) NOT NULL,from_id
int(11) NOT NULL,message
varchar(255) COLLATE utf8_unicode_ci NOT NULL,date_ms
date NOT NULL,time_ms
time NOT NULL,is_read
tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (id
) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=20 ; CREATE TABLE IF NOT EXISTSmessage_group
(user_one
int(11) NOT NULL,user_two
int(11) NOT NULL,hash
int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;