Re: [PHP] Formatting/Financial

2001-01-31 Thread Andrew Golovin

Hello, [!

Thursday, February 01, 2001, 06:33:53, you wrote:

r> Is there a simple way to format a variable into an appropriate financial 
r> string...
r> I'd like all of the above to format as $XXX.XX

   try to use
   
   $value = 5.0;
   $sval = sprintf("$%003.2f",$value);

   $sval will contain formatted value.


Best regards!
Andrew Golovin
PGP Fingertip 24FD A0CD 667C 1FC7 C2F7  A2EA 9742 D484 FD3C 598D
http://exper.ural.ru/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How do I get last inserted ID?

2001-02-02 Thread Andrew Golovin

Hello, Sandeep!

Friday, February 02, 2001, 08:43:41, you wrote:

SH> just a quick question. Say my script is inserting values into a
SH> database, which has an autoincremental id. Now I usually send out a
SH> mail also with the contents of the inserted stuff. The only problem
SH> is that of the ID field. How can I get the script to determine what
SH> id number was given to that row?
for mysql there is a function called mysql_insert_id(). that
function returns the ID generated for an AUTO_INCREMENT column by
the previous INSERT query.

try to dig documentation if you using another db.

Best regards!
Andrew Golovin
PGP Fingertip 24FD A0CD 667C 1FC7 C2F7  A2EA 9742 D484 FD3C 598D
http://exper.ural.ru/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Bah, XML

2001-02-03 Thread Andrew Golovin

Hello, szii!

Sunday, February 04, 2001, 04:48:52, you wrote:

ssc> Why is this failing?
ssc> If I comment out the  xml_set_element_handler() call, it's okay...
ssc> If I comment out the xml_parse() call, it's okay...
ssc> If I leave both of them in...it core dumps.

i meet same problem with freeBSD and php 4.0.4 installed. porblem
solved when i upgrade to php 4.0.4pl1

Best regards!
Andrew Golovin
PGP Fingertip 24FD A0CD 667C 1FC7 C2F7  A2EA 9742 D484 FD3C 598D
http://exper.ural.ru/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Testing CONNECTION Speed

2001-02-10 Thread Andrew Golovin

Hello, Adam!

Thursday, February 08, 2001, 11:48:12, you wrote:

AK> 3) Send a large graphic (200K)

AK> No, it's not transparent to the user and no it's not microtime accurate, but
AK> it *does* work.
it *dosn't* work. what if user turn off grafix in his browser?

>>Is there any way to do this?? i mean.. test the connection speed of a client
>>machine???
  i think that no way to determine client connection speed. browsers
  open not one connection to server. usually it's 10 threads to load
  grafix in separate treads. some grafix placed in cache (remote or
  local).
  asking user is the only way to determine connection speed.

Best regards!
Andrew Golovin
PGP Fingertip 24FD A0CD 667C 1FC7 C2F7  A2EA 9742 D484 FD3C 598D
http://exper.ural.ru/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]