How I can get dialogId, which contains some users?dialogs
id; INT
title; TEXT
lastMessage; INT
dialogUsers
id; INT
dialogId; INT
user; INT
haveNewMsg; BOOL
messages
id; INT
time; INT
msgText; TEXT
dialogId; INT
user; INT
isNewMsg; BOOL
[SOLVED] Implementation of PM
Moderator: General Moderators
[SOLVED] Implementation of PM
Hi everyone, i have db
Last edited by bagi on Sat Jan 04, 2014 4:35 pm, edited 1 time in total.
Re: Implementation of PM
You query for it.
Want to try explaining in more detail?
Want to try explaining in more detail?
Re: Implementation of PM
Yes, but I wanted to ask specific query
Re: Implementation of PM
Then ask.
Re: Implementation of PM
I fixed that.
But here is new problem
But here is new problem
What's wrong?mysql> insert into dialogs(title) OUTPUT INSERTED.ID values('1');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'OUTPU
T INSERTED.ID values('1')' at line 1
mysql>
Re: Implementation of PM
There's a syntax error in your query. What is the query? What are you trying to do?
Re: Implementation of PM
Celauran wrote:There's a syntax error in your query. What is the query? What are you trying to do?
I have id columns (int primary key auto_increment). After inserting values I wanna get this idinsert into dialogs(title) OUTPUT INSERTED.ID values('1');
Upd: found last_insert_id()