做問答系統是對題目修改的bug

2022-03-10 13:44:13 字數 2007 閱讀 3802

沒有有bug的**

else

if('

add' ==$key)

else

if('

edit

' ==$key)

else

if('

editdata

' ==$key)

$column_que_totle =count($column_que);

//應該拿倆陣列對比

$diff =array_merge(array_diff($record_arr,$macth_arr),array_diff($macth_arr,$record_arr));

//如果$diff為空 則只進行update 如果不為空 判斷是單個的鍵值屬於哪個陣列 如果是match則要做刪除 如果是record 則要insert 最後得出 增加和減少的陣列 執行

if(!empty($diff))

else

}if(!empty($arr_reduce))

if(!empty($arr_plus))

else

}$sql .= $temp.")"

; }

else

else

}$sql .= $temp."),"

; }

}//bingo

$model_ans->execute($sql);}}

foreach($macth_arr as $key =>$val)

else

}$updatesql .= $tempstr."

where `id` = $val ";

$model_ans->execute($updatesql);

}echo

'yes';

exit;

}

有bug的**

if('

editdata

' ==$key)

$arr_update_arr = null

; $column_que_totle =count($column_que);

//不應該是從數量上單純判斷

if($count !=$s_count)

else

}//得到需要新新增的倆項

//拼裝sql

$arr_reduce_totle =count($arr_plus);

foreach($arr_plus as $key =>$value)

else

}$sql .= $temp.")"

; }

else

else

}$sql .= $temp."),"

; }

}//bingo

$model_ans->execute($sql);

}else

else

}$delete_sql_str = implode(','

,$arr_reduce);

$sql = "

delete from allscore where id in ($delete_sql_str)";

$model_ans->execute($sql);}}

//最後進行update操作 並且總是要進行這一步

//有可能沒有變化 選項的個數

if(empty($arr_update_arr))

foreach($arr_update_arr as $key =>$val)

else

}$updatesql .= $tempstr."

where `id` = $val ";

$model_ans->execute($updatesql);

}echo

'yes';

exit;

}

做系統不難,難的是生態

今天在看到報道說,阿里手機為自己進行了重新定義 從原來的做產品專為做生態圈。這個或許是乙個必然的轉向。在手機系統的市場中,並不缺少競爭參與者。之前也曾經在 七大手機系統點評對比 mtk,塞班系列,webos palmos,安卓,ios,黑莓,wp8 一 七大手機系統點評對比 mtk,塞班系列,web...

BCH保護小白利益反惹一身騷,這麼做是對是錯?

在剛過去的5月15日bch公升級過程中,bch的大礦工為了保護小白的利益,主動進行了區塊重組。但是最近幾天,有人專門挖出此事來故意進行各種曲解誤導大眾。事件回顧 眾所周知,bch這次公升級主要就是兩個內容 新增schnorr簽名 隔離見證恢復。幣圈 的報道主要集中在schnorr簽名這一點上,而 隔...

CentOS中對ext4檔案系統做磁碟配額

1.修改 etc fstab檔案,使ext4檔案系統支援磁碟配額。uuid 9e6dc1e8 4fc1 4984 be38 524573572d41 mnt ext ext4 defaults,usrquota 0 0 3.檢視mount掛載詳細 mount 可以看到其中有一條 dev sdb1 o...