Re: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Curt Zirzow
* Thus wrote Cody Phanekham ([EMAIL PROTECTED]): > Im trying to retrieve the unsigned value of an integer. sounds pretty simple... > > [code] > $i = -86; > echo "" . sprintf("%d", $i); > echo "" . sprintf("%u", $i); > [/code] > > produces: > -86 > 4294967198 > > what i expected: > -86 > 86 > >

Re[4]: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Tom Rogers
Hi, Friday, October 3, 2003, 4:39:32 PM, you wrote: CP> Yeah abs() looks like it would do the trick CP> I wonder if the same output would be generated using C's sprintf() CP> Too bad i dont have access to C... oh well >> -Original Message- >> From: Tom Rogers [mailto:[EMAIL PROTECTED] >

Re: [PHP] ImageColorAllocate() Problem

2003-10-02 Thread Jed R. Brubaker
Worked perfectly - thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re[2]: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Cody Phanekham
Yeah abs() looks like it would do the trick I wonder if the same output would be generated using C's sprintf() Too bad i dont have access to C... oh well > -Original Message- > From: Tom Rogers [mailto:[EMAIL PROTECTED] > Sent: Friday, 3 October 2003 16:27 > To: Tom Rogers > Cc: Cody Pha

Re: [PHP] Converting various DB's to MySQL using PHP

2003-10-02 Thread Jason Wong
On Friday 03 October 2003 11:41, J Morton wrote: > Summary: Using PHP, need to go from ACCESS -> MySQL. (Millions of > records, hundreds of tables.) > > I am about to embark on a project over the next week which entails (in > part) developing a PHP platform that will convert an Access DB to MySQL

Re: [PHP] ImageColorAllocate() Problem

2003-10-02 Thread Tom Rogers
Hi, Friday, October 3, 2003, 4:23:27 PM, you wrote: JRB> I am having a bizzare problem with the imagecolorallocate() function. Maybe JRB> all of you can help me! JRB> Here is the code: JRB> $hex1 = "0x".$color{0}.$color{1}; JRB> $hex2 = "0x".$color{2}.$color{3}; JRB> $hex3 = "0x".$color{4}.$colo

[PHP] Re: Converting various DB's to MySQL using PHP

2003-10-02 Thread Jed R. Brubaker
I think phpMyAdmin has a "Inset Data From Text File" function that can work with delimited text output. Check it out: http://www.phpmyadmin.net/ "J Morton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all -- > > Summary: Using PHP, need to go from ACCESS -> MySQL. (Millions o

[PHP] Re: undefined function imagecreate()

2003-10-02 Thread Jed R. Brubaker
You know, I am not sure if this will help, but I have a problem very similar to this in my debugger. When I run a script check through my WIN32 PHP module, I get errors related to imagecreate() functions. In a current project I use imagecreatefromjpeg() functions and get the same problems. Fortuna

RE: [PHP] ImageColorAllocate() Problem

2003-10-02 Thread Martin Towell
I think it might be because you're passing a string to the function instead of a hex value... try changing it to this and see if it works $color = ImageColorAllocate($im, hexdec($hex1), hexdec($hex2), hexdec($hex3)); HTH Martin -Original Message- From: Jed R. Brubaker [mailto:[EMAIL PRO

Re[2]: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Tom Rogers
Hi, TR> -86 actually looks like FFAA which if you then look at unsigned is pretty TR> big :) TR> -- TR> regards, TR> Tom Maybe what you need is the abs() function which ignores the sign of a number -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] ImageColorAllocate() Problem

2003-10-02 Thread Jed R. Brubaker
I am having a bizzare problem with the imagecolorallocate() function. Maybe all of you can help me! Here is the code: $hex1 = "0x".$color{0}.$color{1}; $hex2 = "0x".$color{2}.$color{3}; $hex3 = "0x".$color{4}.$color{5}; $color = ImageColorAllocate($im, $hex1, $hex2, $hex3); Simple enough! $colo

Re: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Tom Rogers
Hi, Friday, October 3, 2003, 3:51:59 PM, you wrote: CP> Im trying to retrieve the unsigned value of an integer. sounds pretty simple... CP> [code] CP> $i = -86; CP> echo "" . sprintf("%d", $i); CP> echo "" . sprintf("%u", $i); CP> [/code] CP> produces: CP> -86 CP> 4294967198 CP> what i expected

[PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Cody Phanekham
Im trying to retrieve the unsigned value of an integer. sounds pretty simple... [code] $i = -86; echo "" . sprintf("%d", $i); echo "" . sprintf("%u", $i); [/code] produces: -86 4294967198 what i expected: -86 86 Ive searched the archives but most of the messages refer to %s or %d... nothing in

Re: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread irinchiang
On Fri, Oct 03, 2003 at 11:27:25AM +0800, [EMAIL PROTECTED] wrote: : : I have tried using the methos you have mentioned. But it was not : successful as the cell doesn't seem to be able to GET the COLOUR : selected from the drop down menu. This is a small part of my code : : : cell1 : : & : :

Re: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread irinchiang
On Fri, Oct 03, 2003 at 11:27:25AM +0800, [EMAIL PROTECTED] wrote: : : I have tried using the methos you have mentioned. But it was not : successful as the cell doesn't seem to be able to GET the COLOUR : selected from the drop down menu. This is a small part of my code : : : cell1 : : & : :

Re: [PHP] Dynamic tables-Change cell colour with drop down menu[Scanned]

2003-10-02 Thread Eugene Lee
On Fri, Oct 03, 2003 at 11:27:25AM +0800, [EMAIL PROTECTED] wrote: : : I have tried using the methos you have mentioned. But it was not : successful as the cell doesn't seem to be able to GET the COLOUR : selected from the drop down menu. This is a small part of my code : : : cell1 : : & :

Re: [PHP] embedding code

2003-10-02 Thread Greg Beaver
John Taylor-Johnston wrote: Can I stop tags? I could javascript embed them to: