PHP Classes

limit

Recommend this page to a friend!

      Simple SQL PHP 5  >  All threads  >  limit  >  (Un) Subscribe thread alerts  
Subject:limit
Summary:limit function doesn't work
Messages:1
Author:DarkCoder
Date:2005-01-30 01:57:48
 

  1. limit   Reply   Report abuse  
Picture of DarkCoder DarkCoder - 2005-01-30 01:57:48
Hi

When I looked at the source of the example file I saw the second fetch_col example should only show 2 entries but it shows 4 I saw that the last parameter of fetch_col doesn't work.

line 1081,1082:
if (!preg_match('/^[0-9]+(, ?[0-9]+)?$/', $value)) {
$limit = $value;

I have changed this to:
if (preg_match('/^[0-9]+(, ?[0-9]+)?$/', $value)) {
$limit = "LIMIT ".$value;

and now it works \o/


btw: nice mysql class