Tolong pilih kategori sesuai, jenis posting (pertanyaan atau bukan) dan sertakan tag/topik yang sesuai misal komputer, php, mysql, dll.
Promosi atau posting tidak pada tempatnya akan kami hapus.
Mencantumkan kode program di posting Anda, tolong ikuti aturan yang sesuai, baca http://diskusiweb.com/discussion/39204/aturan-cara-menyisipkan-kode-program-di-diskusiweb

Baca cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

fungsi tanggal disable

gan mau tanya.. mengenai fungsi enable disable.

kalau kasusnya seperti ini gimana :

saya punya web absensi, dan ingin menggunakan fungsi disable berdasarkan hari.

misal : jika sekarang tanggal 25 agustus 2011 saya tidak mengisi form absen, maka besok tanggal 26 agustus yang tanggal 25 agustus tidak bisa di isi pada tanggal 26 agustus (disable). scriptnya kira2 gimana yah gan ?

mohon bantuan nya para mastah...

ini gambarnya :

2ug0vic.jpg

2djnrqf.jpg

Tanggapan

  • waduh... maaf...
    bukannya saya ga mw bantu....
    saya baru blajar programing...

    nanti jg di kasi saran sama ahlinya di sini..
    sabar aja...
    sudah coba googling? :-D
  • udahh gan... bingung saya..
  • Bukannya hanya pakai IF-ELSE saja?
  • klo mnrut saya kata m'krist patut di coba..
    asal tw logika nya seperti ap..
    bagaimana kondisinya..
    bner kn m'krist?
  • brarti tiap event onchange dr tgl,bln,thun hrs ngecek ke databse dlu untuk memastikan dia absen ato tidak,klo bgt pake ajax.
    saran :
    -field yang menyatakan tanggal pake satu field saja agar eventnya 1 x
    -pke jquery ajax lebih mantap
    -pake jquery datepicker, okeh tuh
    silakn d explore dlu...
  • excellent..
    nice idea *-:)
  • bajilx wrote:
    brarti tiap event onchange dr tgl,bln,thun hrs ngecek ke databse dlu untuk memastikan dia absen ato tidak,klo bgt pake ajax.
    saran :
    -field yang menyatakan tanggal pake satu field saja agar eventnya 1 x
    -pke jquery ajax lebih mantap
    -pake jquery datepicker, okeh tuh
    silakn d explore dlu...

    waduh ajax saya belum jago gan..
    boleh kasih gambaran scriptnya gak gan ? biar saya pelajari..
    krist wrote:
    Bukannya hanya pakai IF-ELSE saja?
    iya gan kemarin coba pake if-else tapi kok rada susah yah pas di cobanya... maaf saya masih newbie.. kira2 scriptnya gimana yah ? buat saya bandingin takutnya saya salah kode..
  • coba liat script yg km buat...
    ntar byar dibenerin...
    kn jd tw mana problemnya..
  • Lebih efektif sih start tanggal absen tuh bukan dari 1, tetapi berdasarkan tanggal sekarang..<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php">Option dari SELECT mulai dari TANGGAL hari ini</pre></div></td></tr></table></div>

    Misal sekarang tanggal 2, maka start option tanggal dari angka 2 hingga angka terakhir pada akhir bulan tersebut. Sehingga user tidak akan melakukan select pada tanggal yang lalu..

    Kalo dulu saya buat sistem absensi sih tidak memakai select option tersebut tetapi sudah ada tanggalnya sendiri..
    Kan ga mungkin absen sekarang, isinya di tanggal kemarin atau besok
  • wah bener juga yah... jadi meminimalisir kecurangan.. boleh minta sedikit bocoranya atau script nya gan ? he maklum saya newbie.
  • edited September 2011
    Logikanya aja ya..<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php"><span class="re0">$cek_tanggal</span> <span class="sy0">=</span> CEK TANGGAL BULAN TAHUN SEKARANG<span class="sy0">;</span>
    <span class="re0">$cek_status</span> <span class="sy0">=</span> CEK STATUS USER JIKA SUDAH LOGIN <span class="br0">(</span><span class="nu0">1</span><span class="br0">)</span><span class="sy0">,</span> JIKA BELUM <span class="br0">(</span><span class="nu0">0</span><span class="br0">)</span><span class="sy0">;</span>
     
    <span class="co1">// Tahap 1 - Cek Status Absen</span>
    <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$cek_status</span> <span class="sy0">==</span> <span class="nu0">0</span><span class="br0">)</span> <span class="br0">{</span>
    <span class="co1">// Tahap2 - Include Form</span>
    <span class="kw1">return</span> <span class="kw4">TRUE</span><span class="sy0">;</span>
    <span class="br0">}</span>
    <span class="kw1">else</span> <span class="br0">{</span>
    <span class="kw1">return</span> <span class="kw4">FALSE</span><span class="sy0">;</span>
    <span class="br0">}</span></pre></div></td></tr></table></div>
  • krist wrote:
    Lebih efektif sih start tanggal absen tuh bukan dari 1, tetapi berdasarkan tanggal sekarang..
    Misal sekarang tanggal 2, maka start option tanggal dari angka 2 hingga angka terakhir pada akhir bulan tersebut. Sehingga user tidak akan melakukan select pada tanggal yang lalu..<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php">Option dari SELECT mulai dari TANGGAL hari ini</pre></div></td></tr></table></div></pre>
    yang option ini.. bisa di perjelas lagi ?
    kaya nya saya coba yang ini dulu..
    bagus juga nih.. jadi user absensi ngisinya berdasarkan tanggal sekarang.
    kira2 script php nya seperti apa.. saya kan sudah buat list nya dari tanggal 1 - 31 itu di sisipkanya di sebelah mana ? ini scriptnya :<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php"> 
    <form id="form" name="form" method="post" action="?menu=januari2&amp;action=simpanjanuari2">
    <table width="859" border="0" align="top" id="form">
    <tr>
    <td width="85" align="right"><div align="left">Tanggal</div></td>
    <td width="10"> :</td>
    <td width="750"><select name="d">
    <span class="kw2"><?php</span>
    <span class="kw1">for</span><span class="br0">(</span><span class="re0">$i</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span><span class="re0">$i</span><span class="sy0"><=</span><span class="nu0">31</span><span class="sy0">;</span><span class="re0">$i</span><span class="sy0">++</span><span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">echo</span> <span class="st0">"<option value=<span class="es4">$i</span>><span class="es4">$i</span></option><br>"</span><span class="sy0">;</span>
    <span class="br0">}</span>
    <span class="sy1">?></span>
    </select>
    <select name="m">
    <option value="1" selected="selected">Januari</option>
    <option value="2">Februari</option>
    <option value="3">Maret</option>
    <option value="4">April</option>
    <option value="5">Mei</option>
    <option value="6">Juni</option>
    <option value="7">Juli</option>
    <option value="8">Agustus</option>
    <option value="9">September</option>
    <option value="10">Oktober</option>
    <option value="11">November</option>
    <option value="12">Desember</option>
    </select>
    <input type="text" name="y" size="6" maxlength="4" style="text-align:center;" value="2011"/></td>
    </tr>
    <tr>
    <td align="right"><div align="left">Jam Mulai</div></td>
    <td> :</td>
    <td><input type="text" name="jk" size="4"/>
    Jam Selesai :
    <input type="text" name="nama" size="4"/></td>
    </tr>
    <tr>
    <td align="right"> <div align="left">Cost Center </div></td>
    <td> :</td>
    <td><select name="agama">
    <option value="KP01" selected="selected">KP01</option>
    <option value="KP02">KP02</option>
    <option value="KP03">KP03</option>
    <option value="KP04">KP04</option>
    <option value="KP05">KP05</option>
    <option value="KI01">KI01</option>
    <option value="KI02">KI02</option>
    <option value="KI03">KI03</option>
    <option value="KI04">KI04</option>
    <option value="KI05">KI05</option>
    <option value="KI06">KI06</option>
    </select></td>
    </tr>
    <tr>
    <td align="right"><div align="left">No. Proyek</div></td>
    <td> :</td>
    <td><input type="text" name="tmp_lahir"/></td>
    </tr>
    <tr>
    <td align="right"> <div align="left">Keterangan</div></td>
    <td> :</td>
    <td><textarea name="alamat" rows="1" ></textarea></td>
    </tr>
    </table>
    <input type="submit" name="Submit" value="Simpan" id="tombolsimpan"/>
    </button>
    </button>
    &nbsp;&nbsp;
    <input type="reset" name="Reset" value="Reset" id="tombolreset"/>
    </form>
    </div>
    <div class="AccordionPanelContent">
    <div id="bgsub2"></div>
    <!-- AWAL TABEL LIHAT DATA SISWA -->
    <span class="kw2"><?php</span>
    <span class="re0">$q</span> <span class="sy0">=</span> <span class="st0">"SELECT SEC_TO_TIME(SUM((TIME_TO_SEC(TIMEDIFF(gur_jk,gur_nama))))) as jumlah FROM januari2"</span><span class="sy0">;</span>
    <span class="re0">$r</span> <span class="sy0">=</span> <span class="kw3">mysql_query</span><span class="br0">(</span><span class="re0">$q</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="re0">$d</span> <span class="sy0">=</span> <span class="kw3">mysql_fetch_array</span><span class="br0">(</span><span class="re0">$r</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="sy1">?></span>
    <span class="style2"> </span><br>
    <span class="style1">Jumlah Jam : [ <span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$d</span><span class="br0">[</span><span class="st_h">'jumlah'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span>- ]</span>
    <br>
    <br><table id="mytable" cellspacing="0">
    <tr>
    <th id="thleft" background="images/bg_header.jpg"><div align="center">No</div></th>
    <th colspan="3" background="images/bg_header.jpg" id="th"><div align="center">Action</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">Tanggal</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">Mulai</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">Selesai</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">Jam</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">CostCenter</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">No_Proyek</div></th>
    <th id="th" background="images/bg_header.jpg"><div align="center">Keterangan</div></th>
    </tr>
    <span class="kw2"><?php</span>
    <span class="re0">$qdata</span> <span class="sy0">=</span> <span class="st0">"SELECT * FROM januari2 ORDER BY id ASC"</span><span class="sy0">;</span>
    <span class="re0">$rdata</span> <span class="sy0">=</span> <span class="kw3">mysql_query</span><span class="br0">(</span><span class="re0">$qdata</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="kw2">function</span> ddata<span class="br0">(</span><span class="re0">$gur_jk</span><span class="sy0">,</span><span class="re0">$gur_nama</span><span class="br0">)</span> <span class="br0">{</span>
    <span class="kw3">list</span><span class="br0">(</span><span class="re0">$h</span><span class="sy0">,</span><span class="re0">$m</span><span class="sy0">,</span><span class="re0">$s</span><span class="br0">)</span> <span class="sy0">=</span> <span class="kw3">explode</span><span class="br0">(</span><span class="st0">":"</span><span class="sy0">,</span><span class="re0">$gur_jk</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="re0">$dtAwal</span> <span class="sy0">=</span> <span class="kw3">mktime</span><span class="br0">(</span><span class="re0">$h</span><span class="sy0">,</span><span class="re0">$m</span><span class="sy0">,</span><span class="re0">$s</span><span class="sy0">,</span><span class="st0">"1"</span><span class="sy0">,</span><span class="st0">"1"</span><span class="sy0">,</span><span class="st0">"1"</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="kw3">list</span><span class="br0">(</span><span class="re0">$h</span><span class="sy0">,</span><span class="re0">$m</span><span class="sy0">,</span><span class="re0">$s</span><span class="br0">)</span> <span class="sy0">=</span> <span class="kw3">explode</span><span class="br0">(</span><span class="st0">":"</span><span class="sy0">,</span><span class="re0">$gur_nama</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="re0">$dtAkhir</span> <span class="sy0">=</span> <span class="kw3">mktime</span><span class="br0">(</span><span class="re0">$h</span><span class="sy0">,</span><span class="re0">$m</span><span class="sy0">,</span><span class="re0">$s</span><span class="sy0">,</span><span class="st0">"1"</span><span class="sy0">,</span><span class="st0">"1"</span><span class="sy0">,</span><span class="st0">"1"</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="re0">$dtSelisih</span> <span class="sy0">=</span> <span class="re0">$dtAkhir</span><span class="sy0">-</span><span class="re0">$dtAwal</span><span class="sy0">;</span>
    <span class="re0">$totalmenit</span><span class="sy0">=</span><span class="re0">$dtSelisih</span><span class="sy0">/</span><span class="nu0">60</span><span class="sy0">;</span>
    <span class="re0">$jam</span> <span class="sy0">=</span><span class="kw3">explode</span><span class="br0">(</span><span class="st0">"."</span><span class="sy0">,</span><span class="re0">$totalmenit</span><span class="sy0">/</span><span class="nu0">60</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="re0">$sisamenit</span><span class="sy0">=</span><span class="br0">(</span><span class="re0">$totalmenit</span><span class="sy0">/</span><span class="nu0">60</span><span class="br0">)</span><span class="sy0">-</span><span class="re0">$jam</span><span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy0">;</span>
    <span class="re0">$sisamenit2</span><span class="sy0">=</span><span class="re0">$sisamenit</span><span class="sy0">*</span><span class="nu0">60</span><span class="sy0">;</span>
    <span class="re0">$jml_jam</span><span class="sy0">=</span><span class="re0">$jam</span><span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy0">;</span>
    <span class="kw1">return</span> <span class="re0">$jml_jam</span><span class="sy0">.</span><span class="st0">"."</span><span class="sy0">.</span><span class="re0">$sisamenit2</span><span class="sy0">.</span><span class="st0">"."</span><span class="sy0">;</span>
    <span class="br0">}</span>
    <span class="re0">$no</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span>
    <span class="kw1">while</span> <span class="br0">(</span><span class="re0">$ddata</span> <span class="sy0">=</span> <span class="kw3">mysql_fetch_array</span><span class="br0">(</span><span class="re0">$rdata</span><span class="br0">)</span><span class="br0">)</span><span class="br0">{</span>
    <span class="re0">$gur_tgl_lahir</span><span class="sy0">=</span><span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_tgl_lahir'</span><span class="br0">]</span><span class="sy0">;</span>
    <span class="re0">$gur_jk</span><span class="sy0">=</span><span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_jk'</span><span class="br0">]</span><span class="sy0">;</span>
    <span class="re0">$gur_nama</span><span class="sy0">=</span><span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_nama'</span><span class="br0">]</span><span class="sy0">;</span>
    <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$no</span><span class="sy0">%</span><span class="nu19">2</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$color</span> <span class="sy0">=</span><span class="st0">"#f5fafa"</span><span class="sy0">;</span><span class="re0">$ojan</span><span class="sy0">=</span><span class="st0">"odd"</span><span class="sy0">;</span> <span class="br0">}</span><span class="kw1">else</span><span class="br0">{</span><span class="re0">$color</span><span class="sy0">=</span><span class="st0">"#FFF"</span><span class="sy0">;</span><span class="re0">$ojan</span><span class="sy0">=</span><span class="st0">"even"</span><span class="sy0">;</span><span class="br0">}</span>
     
     
     
    <span class="sy1">?></span>
    <tr id="tes" bgcolor="<span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$color</span><span class="sy0">;</span> <span class="sy1">?></span>" class="<span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ojan</span><span class="sy0">;</span> <span class="sy1">?></span>" >
    <td id="tdleft"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$no</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td"><a href="?actions=ubahjanuari2&id=<span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'id'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span>"><img width="16" height="16" src="images/ubah.png" /></a></td>
    <td id="td"><a href="?actions=hapusjanuari2&id=<span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'id'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span>"></a></td>
    <td id="td" align="center">&nbsp;</td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_tgl_lahir'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_jk'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_nama'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> ddata<span class="br0">(</span><span class="re0">$gur_jk</span><span class="sy0">,</span><span class="re0">$gur_nama</span><span class="br0">)</span><span class="sy0">;</span><span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_agama'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_tmp_lahir'</span><span class="br0">]</span><span class="sy0">;</span> <span class="sy1">?></span></td>
    <td id="td" align="center"><span class="kw2"><?php</span> <span class="kw1">if</span><span class="br0">(</span><span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_alamat'</span><span class="br0">]</span><span class="sy0">==</span><span class="st0">""</span><span class="br0">)</span><span class="br0">{</span><span class="kw1">echo</span> <span class="st0">"-"</span><span class="sy0">;</span><span class="br0">}</span><span class="kw1">else</span><span class="br0">{</span><span class="kw1">echo</span> <span class="re0">$ddata</span><span class="br0">[</span><span class="st_h">'gur_alamat'</span><span class="br0">]</span><span class="sy0">;</span><span class="br0">}</span> <span class="sy1">?></span></td>
    </tr>
    <span class="kw2"><?php</span> <span class="re0">$no</span><span class="sy0">+=</span><span class="nu0">1</span><span class="sy0">;</span> <span class="br0">}</span> <span class="sy1">?></span>
    </table></pre></div></td></tr></table></div>






  • edited September 2011
    Pertama, buat variable tanggal hari ini<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php"><span class="re0">$tanggal_hari_ini</span> <span class="sy0">=</span> <span class="kw3">date</span><span class="br0">(</span><span class="st_h">'d'</span><span class="br0">)</span><span class="sy0">;</span></pre></div></td></tr></table></div>
    Kedua, gunakan while untuk melakukan looping tanggal yang dimulai dari tanggal hari ini<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php"><span class="re0">$tanggal_hari_ini</span> <span class="sy0">=</span> <span class="kw3">date</span><span class="br0">(</span><span class="st_h">'d'</span><span class="br0">)</span><span class="sy0">;</span>
    <span class="kw1">echo</span> <span class="st0">"<select>"</span><span class="sy0">;</span>
    <span class="kw1">while</span><span class="br0">(</span><span class="re0">$tanggal_hari_ini</span> <span class="sy0"><=</span><span class="nu0">31</span><span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">echo</span> <span class="st0">"<option value='"</span><span class="sy0">.</span><span class="re0">$tanggal_hari_ini</span><span class="sy0">.</span><span class="st0">"'>"</span> <span class="sy0">.</span> <span class="re0">$tanggal_hari_ini</span> <span class="sy0">.</span> <span class="st0">"</option>"</span><span class="sy0">;</span>
    <span class="re0">$tanggal_hari_ini</span><span class="sy0">++;</span>
    <span class="br0">}</span>
    <span class="kw1">echo</span> <span class="st0">"</select>"</span><span class="sy0">;</span></pre></div></td></tr></table></div>
  • alhamdullilah bisa gan...
    saya utak atik... di bagian ini.. akhirnya jalan juga,,, thanks berat gan!!!<div class='geshi_syntax'><table><tr><td><div class='code'><pre class="php"><span class="kw2"><?php</span>
     
    <span class="kw1">for</span><span class="br0">(</span><span class="re0">$tanggal_hari_ini</span><span class="sy0">=</span><span class="kw3">date</span><span class="br0">(</span><span class="st_h">'d'</span><span class="br0">)</span><span class="sy0">;</span><span class="re0">$tanggal_hari_ini</span><span class="sy0"><=</span><span class="nu0">31</span><span class="sy0">;</span><span class="re0">$tanggal_hari_ini</span><span class="sy0">++</span><span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">echo</span> <span class="st0">"<option value=<span class="es4">$tanggal_hari_ini</span>><span class="es4">$tanggal_hari_ini</span></option><br>"</span><span class="sy0">;</span>
    <span class="br0">}</span>
    <span class="sy1">?></span></pre></div></td></tr></table></div>
  • \m/ Good

    Tapi itu di tag option kok ada tag br ?
    Walaupun ga berpegaruh pada tampilan, tapi itu yang bikin ga valid di W3C

    #terlaluperfect haha..
  • oia..udah dihapus gan. <br> nya..
    ada yang saya mau tanyakan lagi..

    kan di tempat kerja saya ada sekitar 50 orang, cara memisahkan per account nya gimana yah gan ?

    saya di sini menggunakan session hak akses. untuk bisa mengakses website ini.
    ini databasenya :
    29lino2.jpg

    nah yang jadi kendala adalah... jumlah databasenya yang saya buat 1 orang satu database.. contoh :

    id username hak
    6 ari 1
    5 asep 2

    username asep ini, dia punya database dengan nama januari2
    lalu username ari dia punya database dengan nama januari

    20qc3es.jpg

    kalau menurut saya ini sih akan menjadi kendala kedepanya, kalau seandainya pegawai ada 300 orang... masa saya harus membuat 1 username satu database ?

    apakah ada jalan keluarnya ?
  • edited September 2011
    Itu tergantung konsep aplikasinya ya..
    Mau di-bagaimana-kan fungsinya..

    Isi dari table-table tersebut (januari, januari2, etc) itu apa?
    Lalu tujuannya untuk apa?

    Menurutku cukup menggunakan relasi via id (PRIMARY)

    Coba share dulu bagaimana konsepnya
  • itu isinya gambar yang pertama gan yang paling atas di post.
    jadi gini. saya baut web absen karyawan nah databasenya saya buat 1 orang 1 table
    contoh :
    username asep hak akses 2 :
    databasenya nama bulan2 ini :

    januari2
    pebruari2
    maret2
    april2
    mei2
    juni2
    juli2
    agustus2
    september2
    oktober2
    desember2

    fungsinya untuk mengisi absensi berdasarkan bulan misal sekarang bulan september ya yang di isi table 'september2'. begitupun bulan selanjutnya.
    _________________________________________________________________________________

    username bimo hak akses 3
    databasenya nama bulan2 ini :

    januari3
    pebruari3
    maret3
    april3
    mei3
    juni3
    juli3
    agustus3
    september3
    oktober3
    desember3

    dan seterusnya.
    _________________________________________________________________________________

    saya sih inginya 1 database bisa di pakai untuk semua karyawan jadi tidak usah membuat 1 usernama = 1 table seperti di atas. bisa gak gan ?

Sign In or Register to comment.