Edit report at http://bugs.php.net/bug.php?id=9262&edit=1
ID: 9262 Updated by: [email protected] Reported by: bhunt at netnoteinc dot com Summary: Inconsistency in the implementation of here-docs -Status: Analyzed +Status: Closed Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: windows 98 PHP Version: 4.0.4pl1 -Assigned To: +Assigned To: jani Block user comment: N Private report: N New Comment: Seems to work in 5.3 at least. :) Previous Comments: ------------------------------------------------------------------------ [2001-02-15 11:51:21] [email protected] we only allow very simple assigments with var, here docs is similar to '' and "" maybe we should allow this too? moving to feature/requests ------------------------------------------------------------------------ [2001-02-14 10:09:49] bhunt at netnoteinc dot com Parse error: parse error in units.inc on line 11 When I try to instantiate this class I get the above error. The same query strings work fine when I use them in a procedural context <?php class UnitReport { var $db; // This is the DB connection string var $result; /*This holds the returned recordset from the query*/ var $sqlQueryByLocation1 = <<<QUERYBYLOCATION1 select money_sorted.dialup_user, unit.address1, SUM(money_sorted.money_inserted) from money_sorted INNER JOIN unit ON (unit.dialup_user = money_sorted.dialup_user) WHERE unit.status ="Active" GROUP BY unit.address1 QUERYBYLOCATION1; var $sqlQueryByLocation2 = <<<QUERYBYLOCATION2 select money_sorted.dialup_user, unit.address2, SUM(money_sorted.money_inserted) from money_sorted INNER JOIN unit ON (unit.dialup_user = money_sorted.dialup_user) WHERE unit.status ="Active" GROUP BY unit.address2 QUERYBYLOCATION2; var $sqlQueryByLocation3 = <<<QUERYBYLOCATION3 select money_sorted.dialup_user, unit.address3, SUM(money_sorted.money_inserted) from money_sorted INNER JOIN unit ON (unit.dialup_user = money_sorted.dialup_user) WHERE unit.status ="Active" GROUP BY unit.address3 QUERYBYLOCATION3; var $sqlQueryByLocation4 = <<<QUERYBYLOCATION4 select money_sorted.dialup_user, unit.address4, SUM(money_sorted.money_inserted) from money_sorted INNER JOIN unit ON (unit.dialup_user = money_sorted.dialup_user) WHERE unit.status ="Active" GROUP BY unit.address4 QUERYBYLOCATION4; function connectDb($host,$database,$user,$pass) { $db = mysql_connect($host,$user,$pass); mysql_select_db($database,$db); } //Get revenue by location address1 /*function rev_by_location1() { $this->$result = mysql_query($this->$sqlQueryByLocation1,$this->$db); } //Get revenue by location address2 function rev_by_location2($day_start,$month_start,$year_start,$day_end,$month_end,$year_end) { $this->$result = mysql_query($sqlQuery,$this->$db); } //Get revenue by location address3 function rev_by_location3($day_start,$month_start,$year_start,$day_end,$month_end,$year_end) { $this->$result = mysql_query($sqlQuery,$this->$db); } //Get revenue by location address4 function rev_by_location4($day_start,$month_start,$year_start,$day_end,$month_end,$year_end) { $this->$result = mysql_query($sqlQuery,$this->$db); } //Get revenue by present for all units function rev_to_present() { $this->$result = mysql_query($sqlQuery,$this->$db); } // function last_opened($spreadsheet) { $this->$result = mysql_query($sqlQuery,$this->$db); } function rev_two_dates($spreadsheet) { $this->$result = mysql_query($sqlQuery,$this->$db); } function display() { }*/ } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=9262&edit=1
