php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45154 /* or -- no longer used as comment chars
Submitted: 2008-06-03 05:56 UTC Modified: 2008-06-03 13:32 UTC
From: dillama at canada dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
 [2008-06-03 05:56 UTC] dillama at canada dot com
Description:
------------
/* can no longer be used as a comment character to ignore all text after this character (seems to only affect 5.2)

-- never worked as a comment character in previous version of PHP

Reproduce code:
---------------
$dbh = @mysql_connect ("localhost", "aaa", "aaa") or die ("Cannot connect to DB");
mysql_select_db("test",$dbh) or die ("Cannot select DB");
$sql="select something from table /* dsfadsfasdfadfasdfasfdmkkn";

$result=mysql_query($sql,$dbh) or die ("Cannot submit query" . mysql_error());


Expected result:
----------------
As similar to PHP 5.1 series, the above statement should run without error. Note, -- should work but have never worked either.

Actual result:
--------------
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-03 13:32 UTC] msaraujo@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

http://dev.mysql.com/doc/refman/5.0/en/comments.html
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC