Put the whole SELECT
in brackets:
INSERT INTO messages(src_id, tar_id, body, time)
VALUES
( ( SELECT id FROM chatters WHERE (uname = 'adnan') ),
( SELECT id FROM chatters WHERE (uname = 'john') ),
'Hello John',
'1971-12-16' );
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…