php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9262 Inconsistency in the implementation of here-docs
Submitted: 2001-02-14 10:09 UTC Modified: 2010-12-01 16:02 UTC
From: bhunt at netnoteinc dot com Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 4.0.4pl1 OS: windows 98
Private report: No CVE-ID: None
 [2001-02-14 10:09 UTC] 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()
   {

   }*/

}
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-15 11:51 UTC] andre@php.net
we only allow very simple assigments with var,
here docs is similar to '' and "" maybe we should allow this
too?

moving to feature/requests
 [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
Seems to work in 5.3 at least. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 18:01:28 2024 UTC