Re: [nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-28 Thread Michael Sims
On July 28, 2007, PaulCheung wrote: > When I set the table up I set the LICENCE to INT(8). When populating this > field I was expecting any number larger than 8 digits to be truncated and > any number less than 8 digits to be padded out with zeros, in both cases > this is not happening. Nope. An

Re: [nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-28 Thread David Krings
PaulCheung wrote: I created a MySQL database with tables. In one of the tables, the Customer Name& Address table, I use as the PRIMARY KEY a numeric field that I call LICENCE which is a number generated through a random number generator. When I set the table up I set the LICENCE to INT(8). Wh

[nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-28 Thread PaulCheung
I created a MySQL database with tables. In one of the tables, the Customer Name& Address table, I use as the PRIMARY KEY a numeric field that I call LICENCE which is a number generated through a random number generator. When I set the table up I set the LICENCE to INT(8). When populating this

Re: [nyphp-talk] Determining if cmd line script is running as root?

2007-07-28 Thread Steve Manes
Michael B Allen wrote: How does one determine if a command line PHP script is being executed as root? If there's no posix extension there's no posix_getuid and if the user did 'su' and not 'su -' then the USER environment variable may not be root. If you don't have PHP's POSIX extensions you