T_constant_encapsed_string [英] T_constant_encapsed_string
问题描述
我希望有人知道我在下面的地方出了什么问题。
[PHP]<?php
putenv(" TNS_ADMIN = / u1 / oracle / Produdcts / shu10g / network / admin");
$ con = OCIlogon(" Username"," Password" ;," shu10g");
$ query" Begin p_room_content(1,1,:var_room_id,:var_fixture_id,:var_fixture_description);结束; " ;;
$ stmt = OCIParse($ con,$ query)或死(''无法解析查询'');
OCIBindByName($ stmt,":var_room_id",& $ room_id,4)或死(''无法绑定变量'');
OCIBindByName($ stmt," :var_fixture_id",& $ fixture_id,4)或die(''无法绑定变量'');
OCIBindByName($ stmt,":var_fixture_description",& $ fixture_description,25)或die(''无法绑定变量'');
OCIExecute($ stmt)或die(''不能执行语句'');
OCIFreeStatement($ stmt);
OCILogoff($ con);
Echo" $ room_id $ fixture_id $ fixture_description" ;;
?> [/ PHP]
I''m hoping some one will know where I''ve gone wrong with the following.
[PHP]<?php
putenv("TNS_ADMIN=/u1/oracle/Produdcts/shu10g/network/admin");
$con = OCIlogon("Username","Password","shu10g");
$query "Begin p_room_content(1,1,:var_room_id, :var_fixture_id, :var_fixture_description); End; ";
$stmt = OCIParse($con, $query) or die (''Can not parse query'');
OCIBindByName($stmt,":var_room_id", &$room_id,4) or die (''Cannot bind variable'');
OCIBindByName($stmt,":var_fixture_id", &$fixture_id,4) or die (''Can not bind variable'');
OCIBindByName($stmt,":var_fixture_description", &$fixture_description,25) or die (''Can not bind variable'');
OCIExecute($stmt) or die (''Cannot Execute statement'');
OCIFreeStatement($stmt);
OCILogoff($con);
Echo "$room_id $fixture_id $fixture_description ";
?>[/PHP]
推荐答案
con = OCIlogon(" Username" ,密码,shu10g);
con = OCIlogon("Username","Password","shu10g");
query"开始p_room_content(1,1,:var_room_id,:var _fixture_id,:var_fixture_description);结束; " ;;
query "Begin p_room_content(1,1,:var_room_id, :var_fixture_id, :var_fixture_description); End; ";
stmt = OCIParse(
stmt = OCIParse(
这篇关于T_constant_encapsed_string的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!