[PHP] limiting

2012-10-08 Thread David McGlone
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. $

Re: [PHP] Limiting logins

2010-06-07 Thread Richard Quadling
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

Re: [PHP] Limiting logins

2010-06-06 Thread Skip Evans
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

Re: [PHP] Limiting logins

2010-06-06 Thread Paul M Foster
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

Re: [PHP] Limiting logins

2010-06-06 Thread Ashley Sheridan
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

[PHP] Limiting logins

2010-06-06 Thread Skip Evans
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread Chris
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.

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread Richard Kurth
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread Andrew Ballard
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread brian
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread Andrew Ballard
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-31 Thread brian
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Chris
>> 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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Stephen
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Micah Gersten
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Richard Kurth
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

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Andrew Ballard
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

[PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Richard Kurth
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Per Jessen
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.

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Chris
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Per Jessen
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-24 Thread Chris
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)

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Per Jessen
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Chris
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-23 Thread Per Jessen
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-22 Thread Stut
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-22 Thread Per Jessen
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

Re: [PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-21 Thread Stut
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

[PHP] Limiting connection to mysql using old mysql module (not mysqli)

2007-09-21 Thread Stefano Esposito
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

Re: [PHP] Limiting speed when using CURL functions

2007-03-15 Thread Tijnema !
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

Re: [PHP] Limiting speed when using CURL functions

2007-03-14 Thread Richard Lynch
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

Re: [PHP] Limiting speed when using CURL functions

2007-03-14 Thread Tijnema !
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

Re: [PHP] Limiting speed when using CURL functions

2007-03-12 Thread Richard Lynch
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:

Re: [PHP] Limiting speed when using CURL functions

2007-03-12 Thread Tijnema !
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

Re: [PHP] Limiting speed when using CURL functions

2007-03-12 Thread Martin Marques
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,

[PHP] Limiting speed when using CURL functions

2007-03-12 Thread Tijnema !
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

Re: [PHP] limiting downloads

2006-06-11 Thread tedd
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

[PHP] limiting downloads

2006-06-11 Thread Michelle Konzack
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

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread Richard Lynch
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

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread Greg Donald
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

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread Richard Lynch
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

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread zini10
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

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread zini10
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

Re: [PHP] Limiting Cpu usage

2005-04-10 Thread Greg Donald
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

Re: [PHP] Limiting Cpu usage

2005-04-10 Thread Philip Hallstrom
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

[PHP] Limiting Cpu usage

2005-04-10 Thread zini10
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

Re: [PHP] Limiting character input in

2004-11-16 Thread Philip Thompson
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

Re: [PHP] Limiting character input in

2004-11-16 Thread Richard Davey
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

[PHP] Limiting character input in

2004-11-16 Thread Garth Hapgood - Strickland
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://

RE: [PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
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

Re: [PHP] Limiting an array to unique values

2004-04-06 Thread John W. Holmes
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

RE: [PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
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

Re: [PHP] Limiting an array to unique values

2004-04-06 Thread joel boonstra
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

[PHP] Limiting an array to unique values

2004-04-06 Thread Alex Hogan
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

Re: [PHP] Limiting repetitive file access

2003-11-16 Thread Andre Dubuc
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

Re: [PHP] Limiting repetitive file access

2003-11-16 Thread David Otton
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

Re: [PHP] Limiting repetitive file access

2003-11-15 Thread Raditha Dissanayake
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

[PHP] Limiting repetitive file access

2003-11-15 Thread Andre Dubuc
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

Re: [PHP] limiting functions

2003-06-26 Thread Wendell Brown
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

[PHP] limiting functions

2003-06-26 Thread Daryl Meese
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

Re: [PHP] limiting characters

2003-02-18 Thread Michael P. Carel
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

Re: [PHP] limiting characters

2003-02-18 Thread Justin French
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? &

RE: [PHP] limiting characters

2003-02-18 Thread Dennis Cole
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"

Re: [PHP] limiting characters

2003-02-18 Thread Michael P. Carel
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

Re: [PHP] limiting characters

2003-02-18 Thread R B
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

Re: [PHP] limiting characters

2003-02-18 Thread Justin French
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

[PHP] limiting characters

2003-02-18 Thread Michael P. Carel
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

RE: [PHP] Limiting number of decimal places reported

2002-06-29 Thread Beverly Steiner
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

RE: [PHP] Limiting number of decimal places reported

2002-06-29 Thread John Holmes
> 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

Re: [PHP] Limiting number of decimal places reported

2002-06-29 Thread Pushkar Pradhan
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

[PHP] Limiting number of decimal places reported

2002-06-29 Thread John Wulff
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

Re: [PHP] Limiting text inputs by character count?

2002-06-24 Thread Chris Shiflett
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

Re: [PHP] Limiting text inputs by character count?

2002-06-24 Thread George Whiffen
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

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread John Holmes
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 "

Re: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
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

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Peter
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

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Martin Towell
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: [

[PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
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

Re: [PHP] limiting the livetime of a session possible?

2002-03-11 Thread Samuel Ottenhoff
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

Re: [PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andy
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:

Re: [PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andrey Hristov
_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

[PHP] limiting the livetime of a session possible?

2002-03-11 Thread Andy
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

Re: [PHP] Limiting use on public scripts.

2002-02-12 Thread Bogdan Stancescu
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

RE: [PHP] Limiting use on public scripts.

2002-02-12 Thread Martin Towell
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

[PHP] Limiting use on public scripts.

2002-02-12 Thread Kevin Stone
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

[PHP] Limiting time of PHP script.

2002-02-02 Thread Andre
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

[PHP] Limiting CPU usage/time of spawned processes

2002-01-09 Thread Mike Eheler
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

RE: [PHP] limiting rows and pages like google

2001-09-16 Thread Lawrence . Sheed
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

RE: [PHP] limiting rows and pages like google

2001-09-14 Thread Adrian D'Costa
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;

RE: [PHP] limiting rows and pages like google

2001-09-13 Thread Lawrence . Sheed
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

Re: [PHP] limiting rows and pages like google

2001-09-13 Thread Julian Wood
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

Re: [PHP] limiting rows and pages like google -- again

2001-09-13 Thread Helen
> > 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

Re: [PHP] limiting rows and pages like google -- again

2001-09-13 Thread Adrian D'Costa
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

Re: [PHP] limiting rows and pages like google -- again

2001-09-12 Thread David Robley
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

Re: [PHP] limiting rows and pages like google -- again

2001-09-12 Thread Helen
> 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

[PHP] limiting rows and pages like google -- again

2001-09-12 Thread Adrian D'Costa
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.

[PHP] limiting rows and pages like google

2001-09-12 Thread Aniceto Lopez
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 $

[PHP] limiting rows and pages like google

2001-09-12 Thread Adrian D'Costa
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.

[PHP] limiting lines

2001-07-29 Thread dan
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

[PHP] limiting text output

2001-07-19 Thread chris schneck
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   2   >