Can you please tell how it is more reasonable to store comments in the database? This situation: you need to implement commenting in the "blog" and in the "Photo Album". Here are my thoughts, or make one table with fields
id-ΠΊΠ»ΡΡ text-ΡΠ΅ΠΊΡΡ ΠΊΠΎΠΌΠΌΠ΅Π½ΡΠ° page_id-id ΡΡΡΠ°Π½ΠΈΡΡ Π½Π° ΠΊΠΎΡΠΎΡΠΎΠΉ ΡΠ°ΠΌ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ name-ΠΈΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ type-ΡΠΈΠΏ, "ΠΠ»ΠΎΠ³", Π»ΠΈΠ±ΠΎ "Π€ΠΎΡΠΎΠ°Π»ΡΠ±ΠΎΠΌ"
Or create two tables without the field "type" - one in the photo, the other on the blog. How will be more correct? I would like to hear the advice of professionals, but then suddenly something else will come to my mind to comment out ... every time to create a table? Or the first option will do, and immediately a tip, how to get these comments so that the speed does not leave much to be desired, maybe there is a thread
SELECT
Which can pass several parameters at once
WHERE