<? phpclass BaseLogic extends MyDB { protected $tabName; protected $fieldList; protected $messList; function add($postList) { $fieldList=''; $value=''; foreach ($postList as $k=>$v) { if(in_array($k, $this->fieldList)){ $fieldList.=$k.","; if (!get_magic_quotes_gpc()) $value .= "'".addslashes($v)."',"; else $value .= "'".$v."',"; } } $fieldList=rtrim($fieldList, ","); $value=rtrim($value, ","); $sql = "INSERT INTO {$this->tabName} (".$fieldList.") VALUES(".$value.")"; echo $sql; $result=$this->mysqli->query($sql); if($result && $this->mysqli->affected_rows >0 ) return $this->mysqli->insert_id; else return false; }
??? ??? ?? PHP ??????. ??? ???? ????? ???? ???.
??? ??? ?? ??, ???
Function: add($postList)
Function: Add($postList)
Function: Add
Parameter: $postList ??? ?? ??
Return: ?? ??? ?? ?? ID
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??

01 Jan 2025
????? ???? Amazon?? ? ?? ??? ??? ????. Medium?? ?? ????? ??? ???? ?? ?? ???. ?????! ??? ??? ??? ?????! Python? ??? ???? ? ??? ??? ?? ??? ?????.

21 Jan 2025
?? ???? ?? ???? Amazon?? ? ?? ??? ??? ????. ???? ??? ????? ???? Medium?? ?? ??????. ???? ??? ??? ??????! ?? ? ??????? ??? ??? ??? ?? ?????. JavaS??

26 Oct 2024
Go? ???? GAE ??? ???? ?? ??? ?? Google App Engine ??? ???? Go? ?? ??? ?? ???? ??? ?????. ? ?? ...

15 Dec 2024
?? ??? ??: ? ?? ??? ?? ??? ?? ??? ??? ??? ??? ?? ??? ??? ? ????...

17 Jan 2025
????? ???? Amazon?? ? ?? ??? ??? ????. ? ??? ?? ???? ??? Medium?? ?? ????? ???? ??? ?????! ??? ??? ??? ??? ?????! ??? ?????? Java ??? ??? ??? ??????. ??


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
