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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 21 15:01:29 2024 UTC