Bug #64020 [NEW]: bug.php.net - mysql error - begin
| From: | mateusz dot goik at aliantsoft dot pl | Date: | Fri, 18 Jan 2013 13:16:38 +0000 |
| Subject: | Bug #64020 [NEW]: bug.php.net - mysql error - begin | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15338@lists.php.net to get a copy of this message | ||
From: mateusz dot goik at aliantsoft dot pl
Operating system:
PHP version: Irrelevant
Package: Website problem
Bug Type: Bug
Bug description:bug.php.net - mysql error - begin
Description:
------------
Hi,
https://bugs.php.net/search.php?cmd=display&begin=1
-> OK
https://bugs.php.net/search.php?cmd=display&begin=-1
-> ERROR
File:
https://svn.php.net/viewvc/web/php-bugs/trunk/include/query.php?view=markup
................
38 $begin = (int) (!empty($_GET['begin']) ? $_GET['begin'] : 0);
................
240 if ($limit != 'All' && $limit > 0) {
241 $query .= " LIMIT $begin, $limit";
242 }
................
Fix: $begin >= 0
mysql example:
select 1 limit 0,1 -> OK
select 1 limit -1,1 -> ERROR
--
Edit bug report at https://bugs.php.net/bug.php?id=64020&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64020&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64020&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64020&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64020&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64020&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64020&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64020&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64020&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64020&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64020&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64020&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64020&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64020&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64020&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64020&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64020&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64020&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64020&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64020&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64020&r=mysqlcfg