Senin, 07 Oktober 2013

PHP Indonesia - Facebook: mau tanya cara buat no slip : seperti ini --> 1300...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Publish Your Book on Kindle

Learn to self-publisher your book on Kindle. Boost your brand and credibility with this step-by-step training course for just $99. Enroll today.
From our sponsors
mau tanya cara buat no slip : seperti ini --> 1300...
Oct 7th 2013, 10:27, by Reza Fauzan

Reza Fauzan 10:27am Oct 7
mau tanya cara buat no slip :
seperti ini --> 130000102

13 -> diambil dr tahun 2013
00001 -> untuk urut sampe seterusnya... auto increment, dicek dr database..
bila di database 00001 nanti jd 00002.
02 -> kode user yg menggunakan slipnya.. bila kode usernya lain 03 otomatis no slipnya jg ganti misal : 130000103

bila tahun berganti 2014, nanti slipnya berganti jd 140000102, ulang lagi digitnya dr 1

mohon bantuannya makasih

Oda Aditiya Nicola 10:33am Oct 7
Mmm, ambil data dari variabel date() lalu substring kan tahun, lalu ambil data dari database yang isinya 0001 terus user id juga panggil, keduanya jadikan variabel, udah gitu gabung kan string antara variabel date, no slip, dan user id..

Reza Fauzan 10:35am Oct 7
misal nanti ganti tahun 2014 gmn? 14 lalu otomatis jd 0001 lg. maaf blm nangkep logikanya.. :)

Oda Aditiya Nicola 10:38am Oct 7
kalo date() kan otomatis dia sesuai dg zona waktu kita, mmmm, no slip bukan primary key?

Reza Fauzan 10:38am Oct 7
bukan mas

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar