Php 在多行不工作的情况下插入到
我无法将此插入到工作中。有人能告诉我哪里做错了吗Php 在多行不工作的情况下插入到,php,sybase,Php,Sybase,我无法将此插入到工作中。有人能告诉我哪里做错了吗 $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 . ")
$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产生的错误:
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
我可以在sybase central中插入一行,如:
insert into DBNAME..ACCOUNT (EMAIL, PWD, SALT, ID_APPLICATION)
select EMAIL, PWD, SALT, 3 from ACCOUNT where ID = 10 go
Do this $values = "('" . $e_mail . "', '" .$pwd . "', '" .$salt . "', '" . $id_application . "')";