Hi,
I creat the Table (DB2 - sql statment):
create table tb_proj (codproj char(12) not null,result long varchar, finali
long varchar,primary key (codproj)) in tp_dbsp1
Insert in DB2 (ODBC) in Php:
================================================
$query = "insert into tb_proj values('$cod','$res','$fin')";
if (!($result = odbc_Exec($conn, $query))){
print("Mensagem:".odbc_errormsg());
================================================
I allways have the same message: Invalid SQL Command...
Solution : creat a host variable in PHP.
Solution - Oracle:
================================================
$sql = "INSERT INTO tb_proj (codproj,result,finali) VALUES
('$cod',:resu,:fina);";
$stmt = OCIParse($conn, $sql);
OCIBindByName($stmt,":resu",$res,100);
OCIBindByName($stmt,":fina",$fin,100);
OCIExecute($stmt, OCI_DEFAULT);
================================================
Solution - ODBC ????????
can anybody help me???
thanks
Liris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]