2016-06-24 2 views
1

이 삽입물을 사용할 수 없습니다. 누군가 내가 잘못하고 있다고 나에게 말할 수 있니?여러 행이 작동하지 않는 곳으로 삽입

Column names are illegal. (severity 15, procedure N/A 
The identifier that starts with '...' is too long. Maximum length is 30 
The name '...' is illegal in this context. Only constants, constant expressions, or variables 
allowed here 

내가 좋아하는 중앙 사이베이스의 단일 행을 삽입 할 수있어 :

$id_application = 1; 
foreach ($array_account as $rows) { 
    $e_mail = $rows["EMAIL"]; 
    $pwd = $rows["PWD"]; 
    $salt = $rows["SALT"]; 

    $values = "(" . $e_mail . ", " .$pwd . ", " .$salt . ", " . $id_application . ")"; 
    $query = "INSERT INTO DBNAME..ACCOUNT (EMAIL, PWD, SALT, ID_APPLICATION) " 
    . " VALUES " . $values; 
    $result = sybase_query($query);  
} 

는 iget 오류입니다

해결
insert into DBNAME..ACCOUNT (EMAIL, PWD, SALT, ID_APPLICATION) 
select EMAIL, PWD, SALT, 3 from ACCOUNT where ID = 10 go 

답변

0
Do this $values = "('" . $e_mail . "', '" .$pwd . "', '" .$salt . "', '" . $id_application . "')"; 
+0

, 고마워요. – Prosp

+0

환영합니다 !! – Soyab

관련 문제