php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #110 parser with "+" operator of string
Submitted: 1998-02-27 01:23 UTC Modified: 1998-02-27 01:45 UTC
From: dennys at iim dot nctu dot edu dot tw Assigned: rasmus (profile)
Status: Closed Package: Parser error
PHP Version: 3.0 Latest CVS OS: FreeBSD-2.2.5-SNAP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dennys at iim dot nctu dot edu dot tw
New email:
PHP Version: OS:

 

 [1998-02-27 01:23 UTC] dennys at iim dot nctu dot edu dot tw
the code is:
  $result = mysql("Graduate","SELECT DISTINCT gyear FROM graduate" +
                             " WHERE degree='$degree' ORDER BY gyear");

but got the error message:

Warning: MySQL query failed: parse error near '0' at line 1 in lib_simple.html on line 6

And if I change the code to one line. (don't use the "+" operator)

  $result = mysql("Graduate","SELECT DISTINCT gyear FROM graduate WHERE degree='$degree' ORDER BY gyear");

It's will run successfully.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-27 01:45 UTC] rasmus
There were big warnings when PHP 3.0b5 was released telling you that the
'+' operator was no longer overloaded.  It now only performs a
mathematical addition.  Use the '.' operator to concatenate strings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC