Doc #54921 [Opn]: Omit the extra line.
| From: | johannes@php.net | Date: | Thu, 26 May 2011 13:00:58 +0000 |
| Subject: | Doc #54921 [Opn]: Omit the extra line. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6663@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54921&edit=1
ID: 54921
Updated by: johannes@php.net
Reported by: bimal at sanjaal dot com
Summary: Omit the extra line.
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
A "should" is something else from a "must not." This might fail
depending on MySQL server and client lib versions and configuration. You
should not rely on it.
Previous Comments:
------------------------------------------------------------------------
[2011-05-25 06:51:39] bimal at sanjaal dot com
Description:
------------
---
From manual page: http://www.php.net/function.mysql-query#Parameters
---
The following is not true:
The query string should not end with a semicolon.
Please correct the documentation. It works even with or without the
ending semicolon.
We can run the query that end with semicolons.
PHP should not try to complete the queries itself with the semicolon.
Test script:
---------------
<?php
error_reporting(E_ALL|E_STRICT);
mysql_connect('localhost', 'root', 'toor');
mysql_select_db('test');
$rs = mysql_query('SELECT NOW()
time;'); # Query with semicolon at the
end
$current = mysql_fetch_assoc($rs);
echo $current['time'];
?>
Expected result:
----------------
Query with semicolon works well.
Actual result:
--------------
none
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54921&edit=1