[PHP] converting a number

2004-11-18 Thread Octavian Rasnita
Hi all,

I have a number like 1.0122E9 and I want to convert it into a real number in
a common notation and not in that scientific one (with E).

I have seen that very long numbers are always converted automaticly to that
notation and I need to insert that number in  a MySQL database and in that
case MySQL won't calculate well.

Please tell me how to do that in PHP or in MySQL..

Thank you.

Teddy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] converting a number

2004-11-18 Thread Warren Vail

 I have a number like 1.0122E9 and I want to convert it into a
 real number in
 a common notation and not in that scientific one (with E).

 I have seen that very long numbers are always converted
 automaticly to that
 notation and I need to insert that number in  a MySQL database and in that
 case MySQL won't calculate well.

 Please tell me how to do that in PHP or in MySQL..

Is this what you were thinking of?

$query = insert table(floatcol) values(.sprintf(%2.4f,$yourno).) ;

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] converting a number

2004-11-18 Thread Octavian Rasnita
Not exactly. And this query gives me an error.

Thank you.

Teddy

- Original Message - 
From: Warren Vail [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 11:24 AM
Subject: RE: [PHP] converting a number


 
  I have a number like 1.0122E9 and I want to convert it into a
  real number in
  a common notation and not in that scientific one (with E).
 
  I have seen that very long numbers are always converted
  automaticly to that
  notation and I need to insert that number in  a MySQL database and in
that
  case MySQL won't calculate well.
 
  Please tell me how to do that in PHP or in MySQL..
 
 Is this what you were thinking of?

 $query = insert table(floatcol) values(.sprintf(%2.4f,$yourno).) ;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] converting a number

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 18:50, Octavian Rasnita wrote:
 Not exactly. And this query gives me an error.

Fix the quotes.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Patageometry, n.:
 The study of those mathematical properties that are invariant
 under brain transplants.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Converting week number to unix timestamp

2002-06-12 Thread webmaster



How can I convert the week number(i.e. 1 - 52) to a 
UNIX Timestamp?

Thanks

JJ Harrison[EMAIL PROTECTED]www.tececo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Converting week number to unix timestamp

2002-06-12 Thread Lazor, Ed

You're looking for the mktime function.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 6:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Converting week number to unix timestamp


How can I convert the week number(i.e. 1 - 52) to a UNIX Timestamp?
 
Thanks
 
JJ Harrison
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
www.tececo.com http://www.tececo.com 

 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.