コード例 #1
0
ファイル: app_config2.php プロジェクト: wdingsoft/test1.jit
<select size="3"><option>var</option>a<option>fixed</option></select>
WHERE <font color="blue">jid</font>=
<a>?????</a>
<br>
<button type="submit">OK</button>
</form>
</div>


<div class="cfg">
<form action="" method="GET">
UPDATE <font color="blue">Jiaguwen</font> SET
<select size='13'>
<?php 
$d = new MysqlJiaguwen();
$arr = $d->get_colnames();
foreach ($arr as $colname) {
    print "<option>{$colname}</option>";
}
?>
</select>
=
<select size="3"><option>Add</option><option>Delete</option></select>
<select size="3"><option>var</option><option>fixed</option></select>
WHERE <font color="blue">jid</font>=
<select size="3"><option>var</option><option>fixed</option></select>
<br>
<button type="submit">OK</button>
</form>
</div>
コード例 #2
0
ファイル: i_update.php プロジェクト: wdingsoft/test1.jit
 $row = $ret[0];
 $dbstr = "row | ";
 foreach ($row as $key => $val) {
     if (is_numeric($key)) {
         continue;
     }
     $dbstr .= $key . "=" . $val . " | ";
 }
 syslog(0, $dbstr);
 if (!isset($row[$sc])) {
     $row[$sc] = "";
 }
 // die ("err row[ $sc ] not set.");
 $Oldval = $row[$sc];
 //selected col name
 $colnames = $odb->get_colnames();
 $sc = $colnames[$sc];
 //$Oldval = $row[ $sc ];
 $sql_undo = "UPDATE Jiaguwen SET {$sc}='{$Oldval}' WHERE jid='{$keyId}'";
 $_SESSION["sql_undo"] = $sql_undo;
 $_SESSION["database"] = $db;
 syslog(0, "prepare for undo:" . $sql_undo);
 if ("+" == $op) {
     $newVal = MysqlUti::merge_str_links($Oldval, $uval);
 } else {
     if ("-" == $op) {
         $newVal = MysqlUti::remove_str_links($Oldval, $uval);
     } else {
         die("err op={$op}");
     }
 }