lundi 24 février 2020

how to retrive maximun version related to post?

I have two tables:

table posts
id
text

table old_posts
id 
post_id
text
version

the relation is one to many between post and old_posts when the user edits his/her post I save the old version in old_posts but I need to increment the version number so I have first to get the maximum version for that post.

how I achieve this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire