1
我有一個帶有參考系統的網站,我希望用戶能夠使用樹視圖來查看他們引用的用戶。如何在PHP中構建推薦系統?
我的數據庫表已設置好,以便當用戶使用他的參考代碼 引用某人時,新用戶將獲得一個ID,一個贊助商代碼(來自他的「贊助者」的參考代碼,也就是讓他參與進來的人站點)和一個referal代碼(他自己的代碼讓其他人加入他之下)。
我不知道如何我可以從我的MySQL數據庫,並進入樹視圖腳本得到這個信息。
我需要能夠讓用戶看到他提到的所有人,10級深。
這是可能的嗎?我該怎麼做?
我喜歡在學說ORM嵌套組行爲這種關係 –
的是什麼了$指數代表什麼?和tree_view(11111)有什麼關係呢? – Christoph
$ index是傳遞給查詢以獲取由$ index贊助的所有用戶的用戶的SCode,並且Tree_view是生成贊助樹 –