...

View Full Version : Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or



swapnaj123
03-27-2007, 08:48 AM
HI i am getting this,plz tell me how to solve this

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\xampp\htdocs\xampp\web\hosting\control\bin\interfaces\app_extensions\data_access\implementatio ns\iqdb\iqdb_itemstatus.class on line 46
this is the code
<?php

/**
* $InQuent: iqdb_itemstatus.class,v 1.39.2.2 2005/02/18 00:19:24 jackyc Exp $
*/

$ii = new IRAAIncluder(dirname(__FILE__));
$ii->prep("iqdb_business_implementation.class");
$ii->prep("../../resources/db_bind_query.class");

$ii->prep("../../resources/iqdb_resource_factory.class");
$ii->prep("../../resources/db_query.class");

$ii->prep("../../resources/db_proc_query.class");
$ii->prep("../../resources/db_cache.class");
$ii->prep("../../../common/hash.class");
$ii->prep("../../../common/logger.class");


define("SEARCH_MAXROWS", 1000);

class IQDB_itemstatus extends IQDB_BusinessImplementation
{
//$obj = new IQDB_itemstatus();

function getAccountInstanceId($params, &$txMgr)
{
$account_instance_name =@ $params['acc_inc_name'];
echo '$account_instance_name';
$sql1 = new DBBindQuery();
$query = <<<EOF
SELECT aci.account_instance_id "account_instance" FROM account.instance aci
EOF;
$sql1->setNewQuery($query);
$sql1->addWhere("aci.account_instance_reference", $account_instance_name);

$result = $this->boundselect( $txMgr, $sql1, "no account_instance id for given account instance name", __FILE__, __LINE__, NULL, true );
return $this->keepFirstRow( $result, 'account_instance' );
echo "successfully executed";
}
function getAccountSearch($params, &$txMgr)
{
echo 'started...';
$acc= this->getAccountInstanceId($params,&$txMgr);

$numRows = $params["number_of_rows"];
$offsetRows = $params["row_offset"];
// This is where the *new & improved* search logic starts
$mergedResults = array();
/* Form the query */

$query = <<<EOF
SELECT PROVISION.ADMIN_CONTROL_PANEL_PKG.QUEUE_MANAGEMENT( :v_account_instance_id, $item_cur ) as "queue_management" FROM dual
EOF;
//$ibl = new IQDB_BusinessImplementation();
$sql = new DBBindQuery();
$sql->setParseQuery($query);


$sql->addBoundParam(":v_account_instance_id", $acc);
$result = $this->boundselect ( $txMgr, $sql, NULL, __FILE__, __LINE__ );
return $this->keepFirstRow( $result, '$item_cur' );



}
function packAccountInstanceIDs($result, $type = true)
{
$IDList = array();

if ($result->ok()) {
$rows = $result->getResultValue();
if (count($rows) == 0)
return $IDList;
foreach ($rows as $row) {
if (isset($row['account_instance_id']))
$IDList[] = $row['account_instance_id'];
else if (isset($row['account_id']))
$IDList[] = $row['account_id'];
else
trigger_error("Search ERROR! Could not find account_instance_id OR account_id!");
} // foreach
return $IDList;
} else {
// Something is wrong, return a safe value (nothing)
return $IDList;
}

}
?>

Nightfire
03-27-2007, 10:29 AM
This line won't work with the single quotes around it.


echo '$account_instance_name';


Can't see anything standing out to create the error. There's alot of code there so can you put it in
tags? Is this right too?



SELECT PROVISION.ADMIN_CONTROL_PANEL_PKG.QUEUE_MANAGEMENT( :v_account_instance_id, $item_cur ) as "queue_management" FROM dual

The semi-colon before v_account_instance_id



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum