stockton Posted July 26, 2007 Share Posted July 26, 2007 I am calling a stored procedure from my php program and get the following error/warning:- Warning: ocibindbyname() [function.ocibindbyname]: OCIBindByName: ORA-01036: illegal variable name/number in C:\Program Files\Apache Group\Apache2\htdocs\Events\OracleGetClientTest.php on line 111 Warning: ocibindbyname() [function.ocibindbyname]: OCIBindByName: ORA-01036: illegal variable name/number in C:\Program Files\Apache Group\Apache2\htdocs\Events\OracleGetClientTest.php on line 112 My code looks like:- $StartDate="2006/01/01 06:00:00"; $EndDate="2007/07/26 17:00:00"; $SQL = "begin spPackage.spTablesPlayed(_number, _recordset); end;"; $stmt = OCIParse($conn, $SQL ); $curs = OCINewCursor($conn); if (!$stmt) { trigger_error(sprintf("spTablesPLayed Cannot parse query for [%s] ", $number), E_USER_ERROR); die(); } OCIBindByName($stmt,"_number",&$number,15); OCIBindByName($stmt,"_startdate",&$StartDate, 20); <-------- line 111 OCIBindByName($stmt,"_enddate",&$EndDate, 20); <-------- line 112 OCIBindByName($stmt,"_recordset",&$curs,10,OCI_B_CURSOR); and the relevant piece of the stored procedure look like:- PROCEDURE spTablesPlayed( p_number cards.card_number%type, --varchar2 p_startdate varchar2, p_enddate varchar2, cv_tablesplayed out tablesplayed_cur_type); Please tell me what I am misunderstanding. Link to comment https://forums.phpfreaks.com/topic/61882-solved-illegal-variable-namenumber/ Share on other sites More sharing options...
stockton Posted July 28, 2007 Author Share Posted July 28, 2007 The $SQL statement was wrong Link to comment https://forums.phpfreaks.com/topic/61882-solved-illegal-variable-namenumber/#findComment-309478 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.