Welcome Guest, Not a member yet? Register   Sign In
Help with database query.
#3

(04-23-2015, 05:03 AM)Rufnex Wrote: You can do something like that (with mysql).

PHP Code:
delete from comments where id 10
select id from comments where discussions_id 
= [discussion_idorder by id DESC limit 1
update discussions set last_comment_id 
= [the return value of the select above

Haha i knew I was over thinking this!

It was the query that I could not think of. Thats great mate thank you very much for the swift reply =)
Reply


Messages In This Thread
Help with database query. - by T3utonicT3rror - 04-23-2015, 04:38 AM
RE: Help with database query. - by Rufnex - 04-23-2015, 05:03 AM
RE: Help with database query. - by T3utonicT3rror - 04-23-2015, 05:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB