|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-02-15 11:51 UTC] andre@php.net
[2010-12-01 16:02 UTC] jani@php.net
-Status: Analyzed
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: jani
[2010-12-01 16:02 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
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() { }*/ } ?>