Hi all,
is there any other way to limit this code to only displaying 1 image other
than using return. When I use return, I can't get the other images to display
in lightbox, but when I use echo, all 5 of the images will correctly display
in lightbox, but they are also displaying on the page.
$
On 7 June 2010 04:20, Skip Evans wrote:
> Hey Ash & all,
>
> Thanks for that detailed explanation.
>
> This is a lot of what I was thinking. Cookies can get deleted, etc, and all
> the other things that can toss wrenches into this.
>
> To clarify, they want to limit a single user to two machines m
Hey Ash & all,
Thanks for that detailed explanation.
This is a lot of what I was thinking. Cookies can get deleted,
etc, and all the other things that can toss wrenches into this.
To clarify, they want to limit a single user to two machines
max, but only one at a time.
I'm going to have to
On Sun, Jun 06, 2010 at 08:31:22PM -0500, Skip Evans wrote:
> Hey all,
>
> I'm familiar with setting cookies in PHP and using REMOTE_ADDR
> to get a visitor's IP address (or that of their gateway), but
> not quite sure how to implement a robust mechanism that would
> limit a user to logging in fro
On Sun, 2010-06-06 at 20:31 -0500, Skip Evans wrote:
> Hey all,
>
> I'm familiar with setting cookies in PHP and using REMOTE_ADDR
> to get a visitor's IP address (or that of their gateway), but
> not quite sure how to implement a robust mechanism that would
> limit a user to logging in from only
Hey all,
I'm familiar with setting cookies in PHP and using REMOTE_ADDR
to get a visitor's IP address (or that of their gateway), but
not quite sure how to implement a robust mechanism that would
limit a user to logging in from only two different machines, a
requirement this client has on the pro
brian wrote:
> Richard Kurth wrote:
>> I want to limit these script two send 100 email and then pause for a
>> few seconds and then send another 100 emails and repeat this tell it
>> has sent all the emails that are dated for today. This script is runs
>> by cron so it is running in the background.
Andrew Ballard wrote:
On Thu, Jul 31, 2008 at 4:24 PM, brian <[EMAIL PROTECTED]> wrote:
Andrew Ballard wrote:
On Thu, Jul 31, 2008 at 1:27 PM, brian <[EMAIL PROTECTED]> wrote:
Richard Kurth wrote:
I want to limit these script two send 100 email and then pause for a few
On Thu, Jul 31, 2008 at 4:24 PM, brian <[EMAIL PROTECTED]> wrote:
> Andrew Ballard wrote:
>>
>> On Thu, Jul 31, 2008 at 1:27 PM, brian <[EMAIL PROTECTED]> wrote:
>>>
>>> Richard Kurth wrote:
I want to limit these script two send 100 email and then pause for a few
seconds and then sen
Andrew Ballard wrote:
On Thu, Jul 31, 2008 at 1:27 PM, brian <[EMAIL PROTECTED]> wrote:
Richard Kurth wrote:
I want to limit these script two send 100 email and then pause for a few
seconds and then send another 100 emails and repeat this tell it has sent
all the emails that are dated for today
On Thu, Jul 31, 2008 at 1:27 PM, brian <[EMAIL PROTECTED]> wrote:
> Richard Kurth wrote:
>>
>> I want to limit these script two send 100 email and then pause for a few
>> seconds and then send another 100 emails and repeat this tell it has sent
>> all the emails that are dated for today. This scrip
Richard Kurth wrote:
I want to limit these script two send 100 email and then pause for a few
seconds and then send another 100 emails and repeat this tell it has
sent all the emails that are dated for today. This script is runs by
cron so it is running in the background.
How would I do this
>> I've done something very similar. I have a delivery timestamp column
>> in the table that is initially NULL, and I set it to UTC_TIMESTAMP()
>> for each row as I send the message. My query looks like this then:
>>
>> SELECT * FROM mail_queue WHERE delivery_timestamp IS NULL LIMIT 100.
>>
>> And
I would use a temporary table to hold all the email created in one job.
Have a status field marked as sent, waiting or open.
Have a cron job set 'x' number of open emails to waiting. Execute
periodically.
Have a cron job to send all waiting email and update status to sent.
Execute periodically
Here's a PEAR package that handles this:
http://pear.php.net/package/Mail_Queue/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Richard Kurth wrote:
> I want to limit these script two send 100 email and then pause for a
> few seconds and then send another 10
Andrew Ballard wrote:
On Tue, Jul 29, 2008 at 4:52 PM, Richard Kurth
<[EMAIL PROTECTED]> wrote:
I want to limit these script two send 100 email and then pause for a few
seconds and then send another 100 emails and repeat this tell it has sent
all the emails that are dated for today. This scri
On Tue, Jul 29, 2008 at 4:52 PM, Richard Kurth
<[EMAIL PROTECTED]> wrote:
> I want to limit these script two send 100 email and then pause for a few
> seconds and then send another 100 emails and repeat this tell it has sent
> all the emails that are dated for today. This script is runs by cron so
I want to limit these script two send 100 email and then pause for a few
seconds and then send another 100 emails and repeat this tell it has
sent all the emails that are dated for today. This script is runs by
cron so it is running in the background.
How would I do this and is it the best way
Chris wrote:
>> "Happening at the same time; simultaneous."
>>
>>> 100 people come to your website - that's still going to be 100
>>> connections to the database, regardless of where the results come
>>> from.
>>
>> But if that is one every hour for a hundred hours, your max
>> concurrency is 1.
Per Jessen wrote:
Chris wrote:
Err yes - a query replied to out of cache will take less time to
complete, therefore the connection will be given up faster, therefore
less _concurrent_ connections.
I guess my idea of concurrency is different to yours.
http://en.wiktionary.org/wiki/concurrent
Chris wrote:
>> Err yes - a query replied to out of cache will take less time to
>> complete, therefore the connection will be given up faster, therefore
>> less _concurrent_ connections.
>
> I guess my idea of concurrency is different to yours.
http://en.wiktionary.org/wiki/concurrent
"Happeni
The number of connections is presumably only important if we speak
about the number of concurrent connections. If each query can be
dealt with faster due to caching, the number of concurrent
connections should drop.
Err no - it still has to connect to the database (thus use a
connection slot)
Chris wrote:
[snip]
> will not hit the first cache because the fields are different.
> http://dev.mysql.com/doc/refman/4.1/en/query-cache-how.html
All very true, but when a busy website with 100 hits/interval has 25
duplicate queries, that 24% saved per interval. My only point was -
when you're
Per Jessen wrote:
Stut wrote:
Indeed, but only if you're making a lot of repetitive queries to the
database.
Which is typically what a busy website does :-)
The query cache only works if you give it exactly the same query.
That is:
select blah from table where id=1;
if it changes to
se
Stut wrote:
> Indeed, but only if you're making a lot of repetitive queries to the
> database.
Which is typically what a busy website does :-)
> However, since the OP wants to reduce the number of
> connections to the database, query caching may reduce the time each
> connection is held for it
Per Jessen wrote:
Stut wrote:
Stefano Esposito wrote:
i'm in need to limit the numbers of conection to the database,
whithout loose of functionality. There is a general strategy to
achieve this?
1) Caching
2) Caching
3) Caching
And if all that fails...
4) Caching
And mysqls query cache do
Stut wrote:
> Stefano Esposito wrote:
>> i'm in need to limit the numbers of conection to the database,
>> whithout loose of functionality. There is a general strategy to
>> achieve this?
>
> 1) Caching
> 2) Caching
> 3) Caching
>
> And if all that fails...
>
> 4) Caching
And mysqls query cach
Stefano Esposito wrote:
i'm in need to limit the numbers of conection to the database, whithout loose
of functionality.
There is a general strategy to achieve this?
1) Caching
2) Caching
3) Caching
And if all that fails...
4) Caching
Why do you need to reduce database connections? Is the si
Hi all,
i'm in need to limit the numbers of conection to the database, whithout loose
of functionality.
There is a general strategy to achieve this?
--
Stefano Esposito
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Insoddisfatto del tuo lavoro? Sco
On 3/15/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Wed, March 14, 2007 6:55 am, Tijnema ! wrote:
> On 3/12/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> On Mon, March 12, 2007 7:14 am, Tijnema ! wrote:
>> > Is there any way i can limit the transfer speed when using CURL?
>> >
>> > I'm uplo
On Wed, March 14, 2007 6:55 am, Tijnema ! wrote:
> On 3/12/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> On Mon, March 12, 2007 7:14 am, Tijnema ! wrote:
>> > Is there any way i can limit the transfer speed when using CURL?
>> >
>> > I'm uploading a file to a server, and i don't want the script t
On 3/12/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Mon, March 12, 2007 7:14 am, Tijnema ! wrote:
> Is there any way i can limit the transfer speed when using CURL?
>
> I'm uploading a file to a server, and i don't want the script to f***
> up all
> bandwidth.
I don't recall ever seeing that
On Mon, March 12, 2007 7:14 am, Tijnema ! wrote:
> Is there any way i can limit the transfer speed when using CURL?
>
> I'm uploading a file to a server, and i don't want the script to f***
> up all
> bandwidth.
I don't recall ever seeing that in curl, but check on the curl site,
linked from here:
On 3/12/07, Martin Marques wrote:
Tijnema ! wrote:
> Hi,
>
> Is there any way i can limit the transfer speed when using CURL?
>
> I'm uploading a file to a server, and i don't want the script to f***
> up all
> bandwidth.
man renice
P.D.: This is not a PHP question.
I'm talking about the
Tijnema ! wrote:
Hi,
Is there any way i can limit the transfer speed when using CURL?
I'm uploading a file to a server, and i don't want the script to f***
up all
bandwidth.
man renice
P.D.: This is not a PHP question.
--
21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37,
Hi,
Is there any way i can limit the transfer speed when using CURL?
I'm uploading a file to a server, and i don't want the script to f*** up all
bandwidth.
TIA
Tijnema
At 1:51 PM +0200 6/10/06, Michelle Konzack wrote:
>Hello *,
>
>I am on over 100 Mailinglists and want to make my archive (monthly
>tarbals) public availlable. my problem is, that they are around
>20 GByte compressed archives and I want to prevent peoples to suck
>the whole archive at once...
>
>I
Hello *,
I am on over 100 Mailinglists and want to make my archive (monthly
tarbals) public availlable. my problem is, that they are around
20 GByte compressed archives and I want to prevent peoples to suck
the whole archive at once...
I was trying several things but failed.
Does anyone have a
On Mon, April 11, 2005 3:25 pm, Greg Donald said:
> On Apr 11, 2005 5:06 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> I quit my last job in part because my "dev" server was a "live" box.
>> Sheesh!
>
> I have so been there before. Sucks.
>
> Vmware, user-mode-linux, and Freebsd jails someti
On Apr 11, 2005 5:06 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> I quit my last job in part because my "dev" server was a "live" box. Sheesh!
I have so been there before. Sucks.
Vmware, user-mode-linux, and Freebsd jails sometimes help in these situations.
--
Greg Donald
Zend Certified
On Mon, April 11, 2005 3:05 am, zini10 said:
> ok, that will do some of the trick , but still , a user can just write a
> script which:
>
> for($i=0;$i<;$i++)
> {
> $x=$x+1;
> }
>
> or something and refresh it the whole time and really slow down everybody
> else
Yes.
Allowing untrus
another thing i just noticed is that it is designed for nanoweb server , not
for apache
but thanks anyway for your help.
"Greg Donald" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Apr 10, 2005 9:27 AM, zini10 <[EMAIL PROTECTED]> wrote:
>> hello, how can i limit cpu usag
ok, that will do some of the trick , but still , a user can just write a
script which:
for($i=0;$i<;$i++)
{
$x=$x+1;
}
or something and refresh it the whole time and really slow down everybody
else
"Greg Donald" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On A
On Apr 10, 2005 9:27 AM, zini10 <[EMAIL PROTECTED]> wrote:
> hello, how can i limit cpu usage for shared hosting enviroment?
> i mean , im hosting serveal sites and wish for all php scripts to have (for
> example) no more than 5% of cpu usage so no one can bomb my server.
> im currently using php a
You might want to rethink your strategy. Consider the instance in which
only *one* person is hitting your server. That one person *will* get 100%
of your CPU since nothing else is going on at the time, so the system
might as well give them all the CPU to get their task done sooner.
You don't
hello, how can i limit cpu usage for shared hosting enviroment?
i mean , im hosting serveal sites and wish for all php scripts to have (for
example) no more than 5% of cpu usage so no one can bomb my server.
im currently using php as a module , i know i can do it if ill use php as a
cgi and limit
On Nov 16, 2004, at 1:59 AM, Garth Hapgood - Strickland wrote:
Unlike the input fields that use maxlength to define the number of
character
allowed. Textarea doesnt seem to have that capability. I want to limit
the
number of character to 255.
IS there any way of doing this without having to brea
Hello Garth,
Tuesday, November 16, 2004, 7:59:35 AM, you wrote:
GHS> Unlike the input fields that use maxlength to define the number of
character
GHS> allowed. Textarea doesnt seem to have that capability. I want to limit the
GHS> number of character to 255.
GHS> IS there any way of doing this
Unlike the input fields that use maxlength to define the number of character
allowed. Textarea doesnt seem to have that capability. I want to limit the
number of character to 255.
IS there any way of doing this without having to break my neck about it?
Garth
--
PHP General Mailing List (http://
I guess I deserved that one...
alex hogan
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 9:40 AM
> To: Alex Hogan; PHP General list
> Subject: Re: [PHP] Limiting an array to unique values
>
> From: "Ale
From: "Alex Hogan" <[EMAIL PROTECTED]>
> I have an array that I am using as a parameter for a query in a where
> clause.
>
> The array has values that are like this.
>
> Item 1
> Item 2
> Item 3
> Item 1
> Item 3
> Item 3
> Item 1
>
> What I need to have is unique values only.
>
> Item 1
> Item
Thanks...
Exactly what I needed.
alex hogan
> -Original Message-
> From: joel boonstra [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 9:30 AM
> To: PHP General list
> Subject: Re: [PHP] Limiting an array to unique values
>
> On Tue, Apr 06, 2004 at 0
On Tue, Apr 06, 2004 at 09:27:31AM -0500, Alex Hogan wrote:
> Hi All,
>
> I have an array that I am using as a parameter for a query in a where
> clause.
>
> The array has values that are like this.
>
> Item 1
> Item 2
> Item 3
> Item 1
> Item 3
> Item 3
> Item 1
>
> What I need to have is uniq
Hi All,
I have an array that I am using as a parameter for a query in a where
clause.
The array has values that are like this.
Item 1
Item 2
Item 3
Item 1
Item 3
Item 3
Item 1
What I need to have is unique values only.
Item 1
Item 2
Item 3
How can I sort out the redundant values in that array
On Sunday 16 November 2003 10:45 pm, David Otton wrote:
> On Sat, 15 Nov 2003 23:52:31 -0500, you wrote:
> >Recently, a 'user' attempted to access a restricted area of my site
> >repetitively (spanning five hours) entering the same url repetitively
> >[probably by script]. A massive log file was ge
On Sat, 15 Nov 2003 23:52:31 -0500, you wrote:
>Recently, a 'user' attempted to access a restricted area of my site
>repetitively (spanning five hours) entering the same url repetitively
>[probably by script]. A massive log file was generated. I would like to ban
>such behavior by limiting the
Hi,
While your solution is feasible it would still consume processor and
memory because you are doing this at a very high level, you will
be better of solving this at a lower level by a proper use of a
firewall. What you have described sounds like a kiddie script attempt at
a denial of service
Hi,
Recently, a 'user' attempted to access a restricted area of my site
repetitively (spanning five hours) entering the same url repetitively
[probably by script]. A massive log file was generated. I would like to ban
such behavior by limiting the number of successive 'get's a user can do (say
On Thu, 26 Jun 2003 06:10:48 -0500, Daryl Meese wrote:
>A quick thought -- It would be nice if we had a "authorization code" in the
What about "Safe Mode"? It looks like it can be configured
> http://us3.php.net/manual/en/features.safe-mode.php#ini.safe-mode
Between safe_mode_include_dir and
Ok, lets see if I can sum this up. I have a number of scripts that my
clients (on a virtual host) can include into their PHP scripts to use my
software. While my scripts need clear access to all functions (exec, eval,
unlink, etc) I would like to stop my clients from having access to some of
the
thnks its working here
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 8:09 AM
Subject: Re: [PHP] limiting characters
> Seaso
h" <[EMAIL PROTECTED]>
> To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, February 19, 2003 7:26 AM
> Subject: Re: [PHP] limiting characters
>
>
>> Do you want it chopped at a certain number of words, or characters?
&
P. Carel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 6:19 PM
To: Justin French; [EMAIL PROTECTED]
Subject: Re: [PHP] limiting characters
it would be better if it will be chopped by words and not by characters. Any
idea how?
- Original Message -
From: "Justin French"
it would be better if it will be chopped by words and not by characters. Any
idea how?
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Michael P. Carel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 20
You can use the substr function:
$myoutput = "This is my sample output.";
$myoutput = substr($myoutput,0,10)."...";
From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] limiting characters
Date: Wed, 19 Feb 2003 07:00:5
Do you want it chopped at a certain number of words, or characters?
Justin French
on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote:
> Hi to all,
>
> How could i limit the character output that is being displayed in the html
> page. Is there a function or a php classes that per
Hi to all,
How could i limit the character output that is being displayed in the html
page. Is there a function or a php classes that perfectly support it?
Example:
$myoutput = "This is my sample output.";
Required Output:
This is my
Any idea? Thanks in advance for the replies
mike
John,
Try using the number_format function.
Bev
-Original Message-
From: John Wulff [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 3:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Limiting number of decimal places reported
How do I limit the number of decimal places returned in
> How do I limit the number of decimal places returned in this query?
>
>
> $result2 = mysql_query("SELECT sum(purchase_price) as total FROM
assets
> where order_number='$order_number'");
>
> while(list($order_total) = mysql_fetch_row($result2))
>
> {
>
> print ("$order_total");
If you were
round($order_total), floor("), ceil(") are some options.
> How do I limit the number of decimal places returned in this query?
>
>
> $result2 = mysql_query("SELECT sum(purchase_price) as total FROM assets
> where order_number='$order_number'");
>
> while(list($order_total) = mysql_fetch_row($resu
How do I limit the number of decimal places returned in this query?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
George Whiffen wrote:
>>The best way to do this is server side with strlen(). You can use
>>javascript or maxlength, but if a user wants to get around it, they can.
>>
>>---John Holmes...
>>
>>
>>
>
>John,
>
>The best way to do this is with both. maxlength/Javascript as a courtesy,
> strlen
rver-only checks for required fields etc.,
I switch off and lose confidence in the site.
George
>
> > -Original Message-
> > From: Martin Towell [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, June 23, 2002 9:47 PM
> > To: '[EMAIL PROTECTED]'; [EMAIL
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Limiting text inputs by character count?
>
> a) maxlength="xx"
> b) use javascript
> (document.forms["frm_name"].elements["textarea"].value.length)
> (I think you need the "
Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 24 June 2002 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Limiting text inputs by character count?
>
>
> Is there a way to limit the number of characters that may be inputed into:
> a) a input
> b) a input
for standard text input use
that will only allow 10
characters
not sure if that will also work for text area's
-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 June 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Limiting text inpu
a) maxlength="xx"
b) use javascript
(document.forms["frm_name"].elements["textarea"].value.length)
(I think you need the ".value" bit)
-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:53 AM
To: [
Is there a way to limit the number of characters that may be inputed into:
a) a input
b) a input
I would like to control the maximum number of characters for each of these
inputs.
Any suggestions of where to look, or how to do it, if it's possible, would be
greatly appreciate
The last person gave you a way to do it without using php.ini Re-read
the reply.
1) you can create a timestamp column last_access in your USERS table
2) every time that user hits a page, you need to update that column
3) every time the user asks for a new page, see if the last access is less
me , and on every page request do "Delete
> from session_table where last_time
>
> Best regards,
> Andrey Hristov
>
> - Original Message -
> From: "Andy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 11, 2002 6:
_time
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 6:46 PM
Subject: [PHP] limiting the livetime of a session possible?
> Hi there,
>
> I am building a user registering module and now I am wondering if there
> would be a way to destroy the session if the user was inac
Hi there,
I am building a user registering module and now I am wondering if there
would be a way to destroy the session if the user was inactive for an
specified amount of time.
I found an article on that with following line:
If you propagate the session ID via cookies, you can influence the coo
Maybe setting up a proprietary request including a predefined hashed
(md5) value, for example?
Bogdan
Kevin Stone wrote:
>I have a growing list of simple PHP scripts which we allow our client's
>to use on their websites. These are email scripts, postcard scripts,
>event calendars, statistics
maybe have a client id that they need to send with each request and have the
checking script use that, instead of the ip or url, etc
-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 10:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Limiting
I have a growing list of simple PHP scripts which we allow our client's
to use on their websites. These are email scripts, postcard scripts,
event calendars, statistics tracking, etc... For maintenance and
upgrade purposes we host the scripts in a single location our main
account then allow our
I've a little PHP script that waits for commands and reply to them, it's
setup to run from inetd, and so acts as a server.
My problem is that I want to limit the time this script will wait for a
command (in this case, a line, read by fgets), but set_time_limit seems to
only count the time
Hi There,
Okay, I have a server that allows a couple hundred virtual hosts that we
have run websites as we are a hosting company. Recently one of our
customers decided to spawn lynx through PHP. The process was running at
80% cpu for over 400 minutes, and it appears that Apache's RLimitCPU
di
l Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: September 14, 2001 5:57 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; php general list
Subject: RE: [PHP] limiting rows and pages like google
Hi,
Thanks. Instead of using next and previous I am giving the page number at
the
i<=$pages;$i++) { // loop thru
> $newoffset=$limit*($i-1);
> print "$i \n";
> }
>
> // check to see if last page
> if (!(($offset/$limit)==$pages) && $pages!=1) {
> // not last page so give NEXT link
> $newoffset=$offset+$limit;
p; $pages!=1) {
// not last page so give NEXT link
$newoffset=$offset+$limit;
print "NEXT\n";
}
-Original Message-
From: Julian Wood [mailto:[EMAIL PROTECTED]]
Sent: September 14, 2001 1:34 AM
To: php general list
Subject: Re: [PHP] limiting rows and pages like google
It's not too hard to do the next/previous through all your results, as
has been shown by several people. What is a little trickier, at least
when using mysql and trying to take advantage of the limit clause, is
how to display how many results you have (ie 1 to 10 of 107 results). If
you use t
> > Do you want to list all the pages of posts or just a link to the next 20
> > items?
>
> On the first page, 20 and links to the other items that when selected will
> display the list based on the selection.
>
> One thing to remember is that the ids will not be in squence.
Here's a function I w
On Thu, 13 Sep 2001, Helen wrote:
> > The logic would be to check if the script is called the first time, then
> > the sql statement would be select travel.*, city.city from travel, city
> > where travel.cityid=city.id limit 0,20.
> > The second time or based on what has been selected on the page
On Thu, 13 Sep 2001 14:55, Adrian D'Costa wrote:
> Hi,
>
> I am trying to find out the the best way to do the following:
>
> I have a script that select records from a table. The problem is that
> I need to limit the rows to 20. I know that I can use limit 20. But
> what I want to do is give the
> The logic would be to check if the script is called the first time, then
> the sql statement would be select travel.*, city.city from travel, city
> where travel.cityid=city.id limit 0,20.
> The second time or based on what has been selected on the page (1-20,
> 21-40, etc) add that to the sql s
Hi,
I am trying to find out the the best way to do the following:
I have a script that select records from a table. The problem is that I
need to limit the rows to 20. I know that I can use limit 20. But what I
want to do is give the view a link to the next 20 till all the records are
shown.
paging results:
this is tha idea
page 1 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 0, 20
page 2 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 21, 20
page 3 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 41, 20
...
so
$next = 0 //starting
SELECT * FROM yourtable ORDER BY id DESC LIMIT $
Hi,
I am trying to find out the the best way to do the following:
I have a script that select records from a table. The problem is that I
need to limit the rows to 20. I know that I can use limit 20. But what I
want to do is give the view a link to the next 20 till all the records are
shown.
Hi,
I would like to run a variable of unlimited length through a filter that
would limit its length to 55 lines (ie limiting it's length to less than 1
printed page). Does anyone know of an easy way to do this?
thanks.
Regards,
Dan Barber
Mojolin
---
Mojolin: The Open Source/Lin
To anyone else who had the same problem, I thought i'd share the solution
that was passed on to me. It was suggested that counting the # of characters
in a string would work, and it does, but a better way to do it as not to cut
yourself off in mid sentence is to count the # of actual words.
-- sn
1 - 100 of 106 matches
Mail list logo