Re: [PHP] calculate the time that day ends

2009-02-04 Thread tedd
At 8:59 AM +0100 2/4/09, Lupus Michaelis wrote: Shawn McKenzie a écrit : STFW That's not so fair. If Thodoris ask about day end, it is obvious he's wrong with the word. Wrong because he isn't mastering english. So, without the good word (sunset), he can't find. So please don't bash us w

Re: [PHP] calculate the time that day ends

2009-02-04 Thread Shawn McKenzie
Lupus Michaelis wrote: > Shawn McKenzie a écrit : > >> STFW > > That's not so fair. If Thodoris ask about day end, it is obvious he's > wrong with the word. Wrong because he isn't mastering english. So, > without the good word (sunset), he can't find. So please don't bash us > when we appear si

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Lupus Michaelis
Shawn McKenzie a écrit : STFW That's not so fair. If Thodoris ask about day end, it is obvious he's wrong with the word. Wrong because he isn't mastering english. So, without the good word (sunset), he can't find. So please don't bash us when we appear silly ! -- Mickaël Wolff aka Lupu

Re: [PHP] calculate the time that day ends

2009-02-03 Thread tedd
At 11:36 AM -0500 2/3/09, Dan Shirah wrote: Doesn't every day end at 23:59:59? the next second would be 00:00:00...the beginning of a new day! :) Splitting hairs. December 31, 2008 had two 23:59:59 -- it was a leap second for that year. My grand-kids, being the nerds that they are counted th

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
Shawn McKenzie wrote: Thodoris wrote: 2009/2/3 Thodoris : I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. Most days end at midnight, but there

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
Shawn McKenzie wrote: > Shawn McKenzie wrote: >> Thodoris wrote: 2009/2/3 Thodoris : > I was wondering if there is way to find out what is the time that > every > day ends? I am planning to add this to the first page on an > interface I am > developing. >

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
Shawn McKenzie wrote: > Thodoris wrote: >>> 2009/2/3 Thodoris : >>> I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. >>> Most days end at midnight, b

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
Thodoris wrote: > >> 2009/2/3 Thodoris : >> >>> I was wondering if there is way to find out what is the time that >>> every >>> day ends? I am planning to add this to the first page on an >>> interface I am >>> developing. >>> >> >> Most days end at midnight, but there may be some except

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
2009/2/3 Thodoris : I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. Most days end at midnight, but there may be some exceptions ;-) Seriously though, not really sure what

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Dan Shirah
> Hi gang, > I was wondering if there is way to find out what is the time that every > day ends? I am planning to add this to the first page on an interface I am > developing. > > -- > Thodoris Doesn't every day end at 23:59:59? the next second would be 00:00:00...the beginning of a new day! :

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Stuart
2009/2/3 Thodoris : > I was wondering if there is way to find out what is the time that every > day ends? I am planning to add this to the first page on an interface I am > developing. Most days end at midnight, but there may be some exceptions ;-) Seriously though, not really sure what you're

Re: [PHP] calculate a varchar

2007-12-06 Thread Richard Lynch
I won't say you CAN'T do it (you can with eval) but you'd be WAY better off to use some kind of exchange rate field that you can change frequently instead of cramming formulas into the field. "If eval is the answer, you are probably doing something wrong." You may also want to store everything as

Re: [PHP] calculate a varchar

2007-12-04 Thread Zoltán Németh
2007. 12. 3, hétfő keltezéssel 15.00-kor Andrew Ballard ezt írta: > On Dec 3, 2007 10:56 AM, John Taylor-Johnston > <[EMAIL PROTECTED]> wrote: > > Is there a calculation function? > > > > I'm using an e-commerce shopping cart. I want to tweak the code. The > > author is using a varchar(100) field t

Re: [PHP] calculate a varchar

2007-12-03 Thread Andrew Ballard
On Dec 3, 2007 10:56 AM, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > Is there a calculation function? > > I'm using an e-commerce shopping cart. I want to tweak the code. The > author is using a varchar(100) field to store prices. > > Taking advantage of there being a varchar, instead of ente

Re: [PHP] calculate a varchar

2007-12-03 Thread Jim Lucas
Daniel Brown wrote: On Dec 3, 2007 10:56 AM, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, in

Re: [PHP] calculate a varchar

2007-12-03 Thread Richard Heyes
Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a price, I would like to enter a calculation. (24*2.2)+(24*2.2*.1) 24 is

Re: [PHP] calculate a varchar

2007-12-03 Thread Daniel Brown
On Dec 3, 2007 10:56 AM, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > Is there a calculation function? > > I'm using an e-commerce shopping cart. I want to tweak the code. The > author is using a varchar(100) field to store prices. > > Taking advantage of there being a varchar, instead of ente

Re: [PHP] calculate xml size

2007-05-26 Thread Tijnema
On 5/26/07, Vo, Lance <[EMAIL PROTECTED]> wrote: does php has any function that calculate a xml element in bytes or anything: example: ABC DEF If I want to calculate element , it should return 18 bytes. thanks Lance I have nearly no experience with XML parser in PHP, but it doesn

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 1:54 pm, Juan Felipe Alvarez Saldarriaga wrote: > setcookie wrote: >> pdf_stringwidth() may help you >> >> regards fra* >> >> >> > > Yea I saw that too but you know, pdflib is not free. Depends on your usage and if you need the PDI part or not... PDI == Smush two PDF toge

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:04 pm, Jochem Maas wrote: > there is no dpi - your screen & printer has a certain dpi and that > determine > how big the image displays on either. This is true, but ultimately, if you want the dang thing to print out at 300 DPI, then you want enough pixels to make that

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 11:22 am, Juan Felipe Alvarez Saldarriaga wrote: > 1. Create a dummy image. > 2. Set the text there using font X and the font size Y (it seems that > when I create the image it renders it at 72dpi so I need to reduce it > at > 300dpi) When I did a 300-dpi PDF thingie, I de

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread tedd
At 2:54 PM -0500 2/5/07, Juan Felipe Alvarez Saldarriaga wrote: setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Yes, but there's a free version -- Google fpdf. tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php h

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread setcookie
pdf_stringwidth() may help you regards fra* > >> Hey list! :) > >> > > > > my name's not list but what the heck: > > > > take a look at these function, they should light the way: > > > > http://php.net/manual/en/function.imageftbbox.php > > http://php.net/manual/en/function.imagepsbbox.php > > h

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
Jochem Maas wrote: Juan Felipe Alvarez Saldarriaga wrote: Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php http://php.net/ma

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Jochem Maas
Juan Felipe Alvarez Saldarriaga wrote: > Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php http://php.net/manual/en/function.imagettfbbox

Re: [PHP] Calculate No Of Days

2005-01-03 Thread tg-php
Greetings! I've posted this before, but there are always new readers so here's my script solution. One of these days I'll make it a function or something, but this should give you a good general idea of how to do such a thing in case you need it again in the future. btw: This also calculates

Re: [PHP] Calculate No Of Days

2005-01-03 Thread RaTT
Hi Khuram I use this function function daysLeft($startDate,$endDate=false){ // convert to timestamps $start_stamp = strtotime($startDate); $end_stamp = ($endDate)?strtotime($endDate):time(); if($start_stamp > $end_stamp){

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
On Tue, Mar 16, 2004 at 09:43:28AM -0800, Jason Davidson wrote: > Most likely im not understanding your question.. but, if you are trying > to calculate the total rows by month.. > SELECT whatever FROM table WHERE MONTH(your_date) = '03'; > > and use num_rows or row_count or whatever the php mysql

Re: [PHP] Calculate

2004-03-16 Thread Jason Davidson
joel boonstra <[EMAIL PROTECTED]> wrote: > > On Tue, Mar 16, 2004 at 02:35:57PM +0200, Tommi Virtanen wrote: > > How I can calculate following: > > > > I have table: > > id(int) start_date(date)end_date(date) > > 001 2004-03-10 2004-03-12 > > 002

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
On Tue, Mar 16, 2004 at 02:35:57PM +0200, Tommi Virtanen wrote: > How I can calculate following: > > I have table: > id(int) start_date(date)end_date(date) > 001 2004-03-10 2004-03-12 > 002 2004-03-27 2004-04-02 > 003

Re: [PHP] Calculate total amount from input

2003-10-01 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: Hi all, A PHP question to ask: I am using PHP to do a calculation of the total of fields where user actually input the amount into the text field and I will calculate the TOTAL from the fields as well as the GST. Wonder how should I go about doing that? I did somet

Re: [PHP] calculate the traffic size with php(like the apache

2003-01-10 Thread Jean-Christian Imbeault
I'm not sure what you are trying to do exactly (i haven't been following this thread) but if you want to analyze apache web logs try analog. It can do everything and is *blazzingly* fast. I use on log file that are 10 Gb or greater ... http://www.analog.cx Jc -- PHP General Mailing List (htt

Re: [PHP] calculate the traffic size with php(like the apacheaccess_log)

2003-01-10 Thread Torsten Rosenberger
Hello again thank's for the fast anwser. So I trie it now with the access_log file but this file become very big (20 - 40 MB) and then i get "Allowed memory size of 10485760 bytes exhausted" (i can set the size in php.ini to a higher value but ..) is there a possibility to read a part

Re: [PHP] calculate the traffic size with php(like the apache access_log)

2003-01-09 Thread Marek Kilimajer
Requests for images bypass php, so you need get it from apache log. Torsten Rosenberger wrote: Hello Is it possible to get the transfer (traffic) size from a webpage as is stands in the apache access_log file 127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] "GET /~torsten/cups/pdf.php HTTP/1.1" 20

Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
This was exactly what I was trying to avoid. See I was porting a reporting module to write .XLS files to a database, rather than to files. It's easier for me to clean up old reports that way. Anyway, thanks for your help! Regards, Ian Newlands "@ Edwin" <[EMAIL PROTECTED]> wrote in message n

Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
Well I tried that, however I was saving dynamically generated .XLS files. Because I was using addslashes before hand it was reporting the wrong file size. So it was my mistake, thanks for your help! Regards, Ian Newlands "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:200211091639.43919

Re: [PHP] calculate bytes in string

2002-11-09 Thread @ Edwin
Or, "Jason Wong" <[EMAIL PROTECTED]> wrote: > On Saturday 09 November 2002 14:22, Ian Newlands wrote: > > Does anyone know of a function, or a method to calculate how many bytes are > > in a string? Similar to the filesize file system function. > > > > Any help would be appreciated. > > Assuming

Re: [PHP] calculate bytes in string

2002-11-09 Thread Jason Wong
On Saturday 09 November 2002 14:22, Ian Newlands wrote: > Does anyone know of a function, or a method to calculate how many bytes are > in a string? Similar to the filesize file system function. > > Any help would be appreciated. Assuming 1 character = 1 byte, then strlen(). -- PHP General Mail

RE: [PHP] calculate download time

2001-06-29 Thread Tyrone Mills
scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:42 AM To: php Subject: RE: [PHP] calculate download time simple. get total KB (1k = 1024 bytes) divide that by 60 (seconds in a minute) now you have estimated transfer time in minutes. > -Original Message- > Fr

RE: [PHP] calculate download time

2001-06-29 Thread scott [gts]
simple. get total KB (1k = 1024 bytes) divide that by 60 (seconds in a minute) now you have estimated transfer time in minutes. > -Original Message- > From: Rhett Hermer [mailto:[EMAIL PROTECTED]] > Subject: [PHP] calculate download time > > Hi, > > I am trying to write code to find ou

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-21 Thread Hugh Bothwell
Yick! Three-quarters of the replies to this are not what he asked for, and the others are really scarily inefficient. Total work time = (start time to end of first week) + (end of first week to end of last week) - (end time to end of last week). This is a non-obvious way to phrase it, but it el

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Jason Murray
technology for?" 'Faster pizza delivery.' > -Original Message- > From: SED [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 21, 2001 5:55 AM > To: 'Wim Koorenneef' > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Calculate # of minutes during working

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Rich Cavanaugh
this is just the way I would do it: generate timestamps for 8.00 and 17.30 for the days you want as long as the timestamps are between the two original timestamps. after that it's all subtraction and dividing by 60. That's about as efficient as I can think of. Rich Cavanaugh -Original Messa

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread dcoleman
Hi See http://www.php.net/manual/en/function.jddayofweek.php For each date returning 1 through 5, add the appropriate amounts of minutes to the total HTH Wim Koorenneef wrote: > Hi all, > > I want to calculate the number of minutes between two dates, but only > those minutes on monday through

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread scott [gts]
figure out how many minutes per day, put that as a constant in your script, then just multiply that by the number of days between the two dates. ... or would you prefer something more convoluted? ;) > -Original Message- > From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] > Subject: [PHP]

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread SED
Try to find unix-time in seconds: (endtime - starttime) / 60 = total minutes SED -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Sent: 20. júní 2001 15:26 To: [EMAIL PROTECTED] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Jon Rosenberg
sloppy psuedocode:(but you get the idea) numdays = date2 - date1 minperday = 60 * 9.5(hrs) totalminutes for interval = numdays * minperday - Original Message - From: "Wim Koorenneef" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 20, 2001 11:25 AM Subject: [PHP] Calcul

RE: [PHP] calculate length between date to date

2001-04-22 Thread Jason Murray
> I have 2 variables here that store date start and date end, I > want to compare the lenght between the start date and the end > date, how would I do that? > $dateStart = "$year" . "$mon" . "$date" ; ( for instance, it > will return "20010102") > $dateEnd = "$yearEnd" . "$monEnd" . "$dateEnd"