我有兩張表 - 兩者都是遺留的。 一張桌子,國家,剛剛v領域: entry (index field)
Countryname
Abbrev
我的另一臺是PCustomers它(其中包括)具有 Reference (index field)
country (the foreign key)
我有兩個模型建立: class Countries extends Model
{
我一直在努力與Laravel的關係。我正在做一個簡單的網上商店。我有4個重要的表格:訂單,訂單規則,產品和用戶。 我已經插入訂單與拉拉維爾Shoppingcart這一切都很順利。但是現在我想再次獲得完整的訂單,所以我可以爲它製作一個PDF文件。 這是我的數據庫設計:https://i.stack.imgur.com/nfPJy.png 這是我的訂單模式: public function order
假設我有2表,其中PID和id的主鍵和自動遞增 含有張貼柱 pid | post|
含有聯柱 id | pid | name
and i when獲取後的數據(假設我知道的[名]我想獲取帖子ID) 我可以使用兩個循環在PHP中做到這一點像 $b=mysqli_query($connect,"SELECT pid FROM linking WHERE name='bla'")
while