开发者

URL of edit page like Stack Overflow edit page

I noted that on Stac开发者_开发百科k Overflow when editing a question or answer it opens the same URL with different ids. These ids are continually ids, for example:

  1. http://stackoverflow.com/posts/1232345/edit
  2. http://stackoverflow.com/posts/1232346/edit

1st URL is to edit a question, but the 2nd is to edit an answer.

How can I implement something like that? I thought there are two tables, one for questions and another for answers, so how can I put continually ids in two different tables? What is the idea behind that?


No, both questions and answers are in one table (on Stack Overflow) named Posts, with column PostType (1 (question) or 2 (answer))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜