本文整理汇总了PHP中dbDel函数的典型用法代码示例。如果您正苦于以下问题:PHP dbDel函数的具体用法?PHP dbDel怎么用?PHP dbDel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbDel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($r = mysql_fetch_array($t)) {
$t1 = mysql_query("SELECT replid FROM aka_siswa WHERE angkatan='" . $r['replid'] . "'");
while ($r1 = mysql_fetch_array($t1)) {
$q = dbDel("aka_siswa_ayah", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_grup", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_guru", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_ibu", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_kelas", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_keluarga", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_kontakdarurat", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_saudara", "siswa='" . $r1['replid'] . "'");
$q = dbDel("aka_siswa_tesakademis", "siswa='" . $r1['replid'] . "'");
}
$q = dbDel("aka_siswa", "angkatan='" . $r['replid'] . "'");
}
$q = dbDel("aka_angkatan", "departemen='{$cid}'");
}
}
}
$fform->notif($q);
} else {
if ($opt == 'uf' || $opt == 'df') {
// Prepocessing form
$r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
} else {
}
$fform->dimension(400, 120);
$fform->head();
if ($opt == 'af' || $opt == 'uf') {
require_once MODDIR . 'control.php';
// Add or Edit form
示例2: MstrLastUrut
$fmod = "m_level";
// db Table
$dbtable = "mstr_level";
// Post Variables
if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'up' || $opt == 'dn') {
if ($opt == 'a') {
$urut = MstrLastUrut($dbtable) + 1;
dbInsert($dbtable, array('name' => $name, 'urut' => $urut));
$cid = mysql_insert_id();
} else {
if ($opt == 'u') {
dbUpdate($dbtable, array('name' => $name), "dcid='{$cid}'");
} else {
if ($opt == 'd') {
dbUpdate("employee", array('level' => 0), "status='{$cid}'");
dbDel($dbtable, "dcid='{$cid}'");
} else {
if ($opt == 'up') {
$a = MstrGetNextUrut($dbtable, $cid);
if ($a[0] != -1) {
dbUpdate($dbtable, array('urut' => $a[1]), "dcid='{$cid}'");
dbUpdate($dbtable, array('urut' => $a[2]), "dcid='" . $a[0] . "'");
}
} else {
if ($opt == 'dn') {
$a = MstrGetNextUrut($dbtable, $cid, "DESC");
if ($a[0] != -1) {
dbUpdate($dbtable, array('urut' => $a[1]), "dcid='{$cid}'");
dbUpdate($dbtable, array('urut' => $a[2]), "dcid='" . $a[0] . "'");
}
}
示例3: app_form_gpost
function app_form_gpost()
{
$s = array();
$a = func_get_args();
$n = count($a);
for ($i = 0; $i < $n; $i++) {
if ($a[$i] == 'photo') {
// upload foto
$id = gpost('photo');
if ($id != '') {
if (intval($id) != 0) {
$p = dbFetch("photo", "tmp_photo", "W/replid='{$id}'") . "'";
dbDel("tmp_photo", "replid='{$id}'");
$s['photo'] = $p;
} else {
$s['photo'] = '';
}
}
} else {
//selain foto
$s[$a[$i]] = gpost($a[$i]);
}
}
return $s;
}
示例4: gpost
<?php
$opt = gpost('opt');
if ($opt == 'lookup') {
require_once VWDIR . 'vi_loan.php';
}
if ($opt == 'lookup') {
require_once VWDIR . 'vi_loan.php';
} else {
if ($opt == 'aq') {
$cid = gpost('cid');
dbInsert("p_loan", array('book' => $cid));
require_once VWDIR . 'vi_loan_list.php';
} else {
if ($opt == 'rq') {
$cid = gpost('cid');
dbDel("p_loan", "dcid='{$cid}'");
require_once VWDIR . 'vi_loan_list.php';
} else {
if ($opt == 'uq') {
require_once VWDIR . 'vi_loan_list.php';
} else {
if ($opt == 'cq') {
$sql = "TRUNCATE TABLE `p_loan`";
mysql_query($sql);
require_once VWDIR . 'vi_loan_list.php';
}
}
}
}
}
示例5: fform
// form Module
$fmod='jenisbuku';
$dbtable='pus_jenisbuku';
$fform=new fform($fmod,$opt,$cid,'Jenis Buku');
$inp=app_form_gpost('kode','nama','keterangan');
if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false;
if($opt=='a'){ // add
$q=dbInsert($dbtable,$inp);
}
else if($opt=='u') { // edit
$q=dbUpdate($dbtable,$inp,"replid='$cid'");
}
else if($opt=='d'){ // delete
$q=dbDel($dbtable,"replid='$cid'");
}
$fform->notif($q);
} else {
if($opt=='uf'||$opt=='df'){ // Prepocessing form
$r=dbSFA("*",$dbtable,"W/replid='$cid'");
} else {
}
$fform->head();
if($opt=='af' || $opt=='uf'){ require_once(MODDIR.'control.php'); // Add or Edit form
$fform->fi('Kode',iText('kode',$r['kode'],"width:60px"));
$fform->fi('Jenis buku',iText('nama',$r['nama'],$fform->rwidths));
$fform->fa('Keterangan',iTextarea('keterangan',$r['keterangan'],$fform->rwidths,3));
示例6: fform
$fform = new fform($fmod, $opt, $cid);
$inp = app_form_gpost('departemen', 'angkatan', 'keterangan');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$q = dbInsert($dbtable, $inp);
} else {
if ($opt == 'u') {
// edit
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "replid='{$cid}'");
$q &= dbDel("aka_siswa", "angkatan='{$cid}'");
}
}
}
$fform->notif($q);
} else {
if ($opt == 'uf' || $opt == 'df') {
// Prepocessing form
$r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
} else {
$r['departemen'] = $inp['departemen'];
}
$fform->head();
if ($opt == 'af' || $opt == 'uf') {
require_once MODDIR . 'control.php';
// Add or Edit form
示例7: fform
$fform = new fform($fmod, $opt, $cid);
$inp = app_form_gpost('jenismutasi', 'siswa', 'tanggal', 'keterangan');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$q = dbInsert($dbtable, $inp);
$q = dbQSql("UPDATE aka_siswa SET aktif='3' WHERE replid='" . $inp['siswa'] . "'");
} else {
if ($opt == 'u') {
// edit
$q = dbUpdate($dbtable, $inp, "siswa='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "siswa='{$cid}'");
$q = dbQSql("UPDATE aka_siswa SET aktif='1' WHERE replid='{$cid}'");
}
}
}
$fform->notif($q);
} else {
if ($opt == 'uf' || $opt == 'df') {
// Prepocessing form
$db = new xdb("aka_mutasi");
$db->field("aka_mutasi:replid,jenismutasi,siswa,tanggal,keterangan", "aka_siswa:nis as snis,nama as ssiswa");
$db->join("siswa", "aka_siswa");
$db->where("aka_mutasi.siswa='{$cid}'");
$r = $db->gofetch();
} else {
$r = array();
示例8: appmod_use
<?php
appmod_use('aka/angkatan');
$opt = gpost('opt');
$cid = gpost('cid');
if ($cid == '') {
$cid = 0;
}
dbDel("aka_tmp_saudara", "sesid='" . session_id() . "'");
$fmod = 'siswa_pendataan_angkatan';
$dept = gpost('departemen');
$departemen = departemen_r($dept);
if (count($departemen) > 0) {
$angk = gpost('angkatan');
$angkatan = angkatan_r($angk, $dept);
// Page Selection Bar
$PSBar = new PSBar_2();
$PSBar->begin();
$PSBar->selection_departemen($fmod, $dept);
if (count($angkatan) > 0) {
$PSBar->selection('Angkatan', iSelect('angkatan', $angkatan, $angk, $PSBar->selws, $fmod . "_get()"));
} else {
$PSBar->end();
hiddenval('angkatan', $angk);
angkatan_warn(0, 'float:left');
$PSBar->pass = false;
}
$PSBar->end();
if ($PSBar->pass) {
if ($opt == 'af' || $opt == 'uf') {
require_once VWDIR . 'siswa_form.php';
示例9: dbSFA
} else {
if ($opt == 'u') {
$r = dbSFA("*", "mstr_user", "W/dcid='{$cid}'");
if ($password0 != '') {
$password = md5($password0);
if ($r['password'] = $password && $password1 == $password2) {
$password = md5($password1);
dbUpdate("mstr_user", array('alias' => $alias, 'password' => $password), "dcid='{$cid}'");
}
} else {
dbUpdate("mstr_user", array('alias' => $alias), "dcid='{$cid}'");
}
require_once APPDIR . 'm_user_table.php';
} else {
if ($opt == 'd') {
dbDel("mstr_user", "dcid='{$cid}'");
require_once APPDIR . 'm_user_table.php';
} else {
if ($opt == 'af') {
// Add Form
?>
<table cellspacing="0" cellpadding="0" width="100%"><tr><td align="center" style="padding-top:120px">
<div class="fformbox" style="width:400px">
<div class="sfont" style="color:#ffffff;border-radius:5px 5px 0 0;background:#6a92e5;padding:6px 0 6px 0;">
<b>Add New <?php
echo $mtitle;
?>
</b>
</div>
<div style="text-align:left;padding:10px">
<table class="stable" cellspacing="0" cellpadding="4px" width="380px">
示例10: dbInsert
}
}
} else {
for ($i = 0; $i < $njam; $i++) {
$q = dbInsert($dbtable, $inp);
}
}
} else {
if ($opt == 'u') {
// edit
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "replid='{$cid}'");
$q &= dbDel("aka_siswa", "kelas='{$cid}'");
}
}
}
//$fform->notif($q);
} else {
if ($opt == 'uf' || $opt == 'df') {
// Prepocessing form
$r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
} else {
$r = farray('kelas', 'tingkat', 'kapasitas', 'wali', 'keterangan');
$r['tahunajaran'] = gpost('tahunajaran');
$r['tingkat'] = gpost('tingkat');
$r['kapasitas'] = 1;
}
$fform->dimension(450, 100);
示例11: transaksi_update
function transaksi_update($tid,$tgl,$urai,$nom,$jur){
$n=count($jur);
if($n>0){
$trans=array();
$trans['tanggal']=$tgl;
$trans['uraian']=$urai;
$trans['nominal']=0;
for($i=0;$i<$n;$i++){
$jurnal=$jur[$i];
$trans['nominal']+=$jurnal['debet'];
}
if(dbUpdate("keu_transaksi",$trans,"replid='$tid'")){
dbDel("keu_jurnal","transaksi='$tid'");
for($i=0;$i<$n;$i++){
$jurnal=$jur[$i];
$jurnal['transaksi']=$tid;
$q=dbInsert("keu_jurnal",$jurnal);
}
}
}
transaksi_cekpembayaran($tid);
return $tid;
}
示例12: count
$n = count($did);
for ($i = 0; $i < $n; $i++) {
$tgl = $did[$i];
$tanggal = $tgl_cm . $tgl;
$absen = gpost('absen_' . $tgl);
$keterangan = gpost('keterangan_' . $tgl);
dbDel("aka_absen_guru", "guru='{$cid}' AND tanggal='{$tanggal}'");
$q = dbQSql("INSERT INTO aka_absen_guru SET absen='{$absen}',keterangan='{$keterangan}',guru='{$cid}',tanggal='{$tanggal}'");
//log_print("INSERT INTO aka_siswa_kelas SET kelas='$kls',siswa='$cid'");
}
}
} else {
if ($opt == 'd') {
// delete
$kls = gpost('kelas');
$q = dbDel($dbtable, "guru='{$cid}' AND kelas='{$kls}'");
} else {
if ($opt == 'af' || $opt == 'uf') {
$fform = new fform($fmod, $opt, $cid, 'Data presensi guru');
$fform->reg['btnlabel_a_n'] = 'Batal';
$fform->dimension(600);
$fform->ptop = 5;
$fform->globalkey = '0';
$fform->reg['title_af'] = 'Edit <idata>';
$fform->head();
//$fform->fl('Departemen',departemen_name(gpost('departemen')));
//$fform->fl('Tingkat',tingkat_name(gpost('tingkat')));
//$fform->fl('Tahun ajaran',tahunajaran_name(gpost('tahunajaran')));
$fform->rheight = '';
if ($opt == 'af') {
//$fform->fl('Kelas',kelas_name(gpost('kelas')));
示例13: dbDel
// Job History
dbDel("emp_jobhis", "empid='{$dcid}'");
for ($i = 0; $i < 10; $i++) {
if (gpost('jobhis_name' . $i) != '') {
$name = gpost('jobhis_name' . $i);
$address = gpost('jobhis_address' . $i);
$date1 = gpost('jobhis_date1' . $i);
$date2 = gpost('jobhis_date2' . $i);
$position = gpost('jobhis_position' . $i);
$salary = gpost('jobhis_salary' . $i);
$reason = gpost('jobhis_reason' . $i);
dbInsert("emp_jobhis", array('empid' => $dcid, 'name' => $name, 'address' => $address, 'date1' => $date1, 'date2' => $date2, 'position' => $position, 'salary' => $salary, 'reason' => $reason));
}
}
// References
dbDel("emp_reference", "empid='{$dcid}'");
for ($i = 0; $i < 10; $i++) {
if (gpost('reference_name' . $i) != '') {
$name = gpost('reference_name' . $i);
$address = gpost('reference_address' . $i);
$phone = gpost('reference_phone' . $i);
$job = gpost('reference_job' . $i);
$know = gpost('reference_know' . $i);
$relation = gpost('reference_relation' . $i);
dbInsert("emp_reference", array('empid' => $dcid, 'name' => $name, 'address' => $address, 'phone' => $phone, 'job' => $job, 'know' => $know, 'relation' => $relation));
}
}
// Additional info
$inp = array();
for ($i = 1; $i <= 5; $i++) {
$inp['info' . $i] = gpost('ainfo' . $i);
示例14: dbUpdate
}
} else {
if ($opt == 'u') {
// edit
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "replid='{$cid}'");
if ($q) {
dbUpdate("psb_calonsiswa", array('idsiswa' => 0, 'kelas' => 0), "idsiswa='{$cid}'");
dbDel($dbtable . '_ayah', "siswa='{$cid}'");
dbDel($dbtable . '_ibu', "siswa='{$cid}'");
dbDel($dbtable . '_keluarga', "siswa='{$cid}'");
dbDel($dbtable . '_kontakdarurat', "siswa='{$cid}'");
dbDel($dbtable . '_saudara', "siswa='{$cid}'");
}
}
}
}
$fform->notif($q);
} else {
if ($opt == 'uf' || $opt == 'df') {
// Prepocessing form
$r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
} else {
$r = farray('nis', 'nisn');
$r['departemen'] = gpost('departemen');
$r['tahunajaran'] = gpost('tahunajaran');
$r['kelas'] = gpost('kelas');
}
示例15: gpost
$data = gpost('data');
if ($data != "") {
$q = true;
$did = explode(",", $data);
$n = count($did);
for ($i = 0; $i < $n; $i++) {
$cid = $did[$i];
$q &= dbQSql("INSERT INTO aka_siswa_kelas SET kelas='{$kls}',siswa='{$cid}'");
//log_print("INSERT INTO aka_siswa_kelas SET kelas='$kls',siswa='$cid'");
}
}
} else {
if ($opt == 'd') {
// delete
$kls = gpost('kelas');
$q = dbDel($dbtable, "siswa='{$cid}' AND kelas='{$kls}'");
} else {
if ($opt == 'af') {
$fform = new fform($fmod, 'af', $cid, 'Cari item');
$fform->reg['title_af'] = '<idata>';
$fform->reg['btnlabel_a_y'] = 'Pilih yg ditandai';
$fform->reg['btnlabel_a_n'] = 'Batal';
$fform->dimension(500);
$fform->ptop = 20;
$fform->globalkey = '0';
$fform->head('Pilih Siswa');
echo '<tr><td><div id="box_siswa_pendataan_kelas_list">';
require_once APPDIR . 'siswa_pendataan_kelas_list_get.php';
echo '</div></td></tr>';
$fform->foot();
} else {