|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
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.


Add a Patch

Pull Requests

Add a Pull Request


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-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 13:01:24 2023 UTC