Q:

mysql table with auto increment column restarting

The title is probably not very obvious, I'll try to explain what I want.
I found lots of questions like mine here, but the answers didn't help me.
Let's say I have this table and it's fields in a video's website:
Comments
ID | IDuser | IDvideo | comment

I want to make my primary key a combination of ID and IDuser fields.
IDuser comes from the user table.
ID is an auto_increment column.
But I want it to work like this example.
1 | 2 | 3 | "this is the first comment of user 2 in the video 3"
2 | 2 | 4 | "this is the first comment of user 2 in the video 4"
3 | 2 | 4 | "this is the second comment of user 2 in the video 4"
1 | 3 | 3 | "this is the first comment of user 3 in the video 3"

You see? It's like every user has his own auto_increment range.
I want to do this because otherwise the first column would have a very large number, because for every comment you would have a sequential ID.
Do you have any suggestion for me?
Thank you very much.

A:

First, you can't use AutoIncrement that way.
Second, you shouldn't.

AutoIncrement is used to create an ID row for a table. Each row SHOULD have it's own unique ID.  
If you want to have a relative ID for users comments, you should create a new collumn whose value should be set manually.
Good luck!
EDIT
In your case your table should be something like this:

id INT Unsigned AutoIncrement
idUser INT Unsigned Indexed Foreignkey
idVideo INT Unsigned Indexed Foreignkey
idUserComment INT Unsigned
Comment Varchar

But i would not recommend you to have a relative ID. Unless it would make some sense for your application

