|  |  | 
          
            | ข้อมูลไม่สามารถ add เข้าไปได้ครับติด Error ที่ implode ครับ Warning : implode() [function.implode]: Invalid arguments passed in C:\
 
 หน้าเพิ่ม (PHP)
 
 <select id="select_another" name="select_another[]"  multiple size="5">
            <?PHP
			$strSQL3 = "SELECT * FROM element WHERE  id_detail=' ".$objResult["id_detail"]." ' ";
			$objQuery3= mssql_query($strSQL3);
			while($eleDDL=mssql_fetch_array($objQuery3)){
			echo "<option value='".$eleDDL['ele_name']."'>".$eleDDL['ele_name']."</option>";
			}
			
			$another=$_POST['select_another'];
			if($another){
			foreach ($another as $n){echo 'You selected ',$n,'<br />';}
			}
			?>
                </select>
 หน้ารับค่า (PHP)
 
 $ele = $_POST['select_another']; //Error ครับ
$element = implode("",$ele); //Error ครับ
$strSQL = "SELECT * FROM detail";
$objQuery = mssql_query($strSQL) or die ("Error Query [".$strSQL."]");
$strSQL ="INSERT INTO detail";
$strSQL .="(ThaiName,EngName,word,type,orther,Address,province,amphur,district,zip,mail,web,hotline,busi,bg,etc,detail,price,branch,
commonday,holiday,note,town1,town2,town3,town4,rate,Created,CreatedBy,CreatedTime,IsActive,Enable,IsSecret,element)";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["text_name"]."','".$_POST["text_name2"]."','".$_POST["text_word"]."','".$_POST["select_type"]."',
'".$_POST["text_orther"]."','".$_POST["Address"]."','".$_POST["select_province"]."','".$_POST["select_amphur"]."',
'".$_POST["select_district"]."','".$_POST["text_zip"]."','".$_POST["text_mail"]."','".$_POST["text_web"]."','".$_POST["text_hotline"]."',
'".$_POST["select_busi"]."','".$_POST["select_bg"]."','".$all."','".$_POST["area_detail"]."','".$_POST["text_price"]."',
'".$_POST["area_branch"]."','".$commonday."','".$holiday."','".$_POST["area_note"]."','".$_POST["text_town1"]."',
'".$_POST["text_town2"]."','".$_POST["text_town3"]."','".$_POST["text_town4"]."','".$_POST["select_rate"]."',
'".$_POST["text_user_create"]."','".$_POST["text_date_create"]."','".$_POST["text_time_create"]."','".$_POST["IsActive"]."',
'".$_POST["text_enable"]."','".$_POST["IsSecret"]."','".$element."') ";
$objQuery = mssql_query($strSQL);
echo $strSQL;
$strSQL = "SELECT @@IDENTITY AS last_id FROM detail;";
$objQuery = mssql_query($strSQL);
$rows = mssql_fetch_assoc($objQuery);
$last_id = $rows["last_id"];
 
 
 Tag : PHP, Ms SQL Server 2008
 
 
 |  
            | 
 ประวัติการแก้ไข
 2011-09-07 08:45:38
 2011-09-07 08:46:52
 |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2011-09-07 08:45:01 | By :
                          Nos1001 | View :
                          993 | Reply :
                          1 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |