prefix("contact_cate")."` where `parent_gsn` = '$parent_gsn' order by `sort`"; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'] , 3, mysql_error()); $main=""; while(list($gsn , $title)=$xoopsDB->fetchRow($result)){ $main.="{$title}"; } return $main; } //取得該分類下的通訊錄資料 function get_contact($gsn){ global $xoopsDB ; $sql = "select * from `".$xoopsDB->prefix("contact")."` where gsn='$gsn'"; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'],3, mysql_error()); $all_content=""; while($all=$xoopsDB->fetchArray($result)){ //以下會產生這些變數: $tel , $email , $name , $gsn , $sn , $birthday , $zip , $county , $city , $addr foreach($all as $k=>$v){ $$k=$v; } $cate=get_contact_cate_all(); $all_content.=" {$cate[$gsn]['title']} {$name} {$tel} {$email} {$birthday} {$zip} {$county}{$city}{$addr} "; } return $all_content; } ?> ```
進階搜尋
538人線上 (194人在瀏覽線上書籍)
會員: 0
訪客: 538