Mysql tablo yapısı ve sorgu

0 Cevap php

Ben burada oldukça basit bir şey üzerinde karıştı alıyorum düşünüyorum.

Ben adım bir numara ile kullanıcı alır bir komut dosyası oluşturma. Ben sadece doğru tablo yapısını kurmak varsa merak ve aynı zamanda bir insert sorgusu mümkünse biraz yardıma ihtiyaç duyuyorum.

Benim veritabanı yapısı bu şu anda benzer:

step_id     user_id       step_url                   step_order
   1           1       example.com?step=1              1
   2           2      test.com?step=1                  1
   3           1       example.com?step=3              2

Would this be the best way to do this? Or is there a better way than storing by order? E.g saving the next step_id in the row, or something else?

Yani nasıl ki bir kullanıcı için eklenen her yeni satır için 1 ile sipariş sütunu artırmak isterseniz?

Ayrıca ne User_id 1 adım 2 step_url seçmek için step_order 1 ise kullanılan SELECT sorgusu olacaktır.

Herhangi bir yardım için teşekkür ederiz.

Paul


Merhaba çocuklar, cevaplar için teşekkürler. Ben ben biraz daha iyi anlatmaya çalışacağım yani bir yerde olmak zorunda çünkü ben soruyu biraz aceleye düşünüyorum.

  1. Onlar istedikleri gibi, her kullanıcı gibi birçok adımları oluşturabilirsiniz ve tüm adresler benzersiz olacak
  2. Kendilerini diğer insanları yönlendirmek için adresler olan adımları kullanarak olmayacak Kullanıcılar
  3. On each of the steps there will be a form and after the form has been submitted and processed my script will need to direct the visitor to the next step in my users process.

0 Cevap