"id" "parent" "name"
"1" "0" "Books"
"2" "1" "Crime Fiction"
"3" "2" "Death On the Nile"
從類似上述情況,我該怎麼選擇父行的name
與child
的姓名。這裏將提供子行的名稱。我需要獲得父母的name
。選擇父行,當子行提供
所需的輸出:
@id = 3
Crime Fiction //This is the name of the parent row - in this case 2
Death on the Nile // This is the name of the row who's id was supplied.
如何在同一個表中選擇做什麼?
太棒了,謝謝:) –