Waynn Lue | 1 Mar 2009 01:08
Picon
Gravatar

Re: [PHP-DB] How important is your Express or Web Edition database? Please weigh in--

Plus, last time I checked, adding an enum required a full rebuild of
the table, while having an auxiliary table allows it to happen much
more quickly.

Waynn

On 2/28/09, Andrew Ballard <aballard <at> gmail.com> wrote:
> On Sat, Feb 28, 2009 at 5:13 AM, Ashley Sheridan
> <ash <at> ashleysheridan.co.uk> wrote:
>> On Sat, 2009-02-28 at 01:04 -0500, Andrew Ballard wrote:
>>> On Fri, Feb 27, 2009 at 7:32 PM, Ashley Sheridan
>>> <ash <at> ashleysheridan.co.uk> wrote:
>> I absolutely love enum datatypes; they allow you to use string values
>> but internally stores them as numbers, and prevents the wrong data from
>> being inserted. Much simpler than joining extra tables of values onto
>> it.
>
> Oh, I know why programmers love them. I like them for a lot of the
> same reasons, but I'm enough of a DBA that I'm still not sure they are
> a very good idea in a SQL database. Granted, indexes on an ENUM column
> will be more useful than on SET columns, but what do you do when you
> need to add a value to the list? You have to have permission to modify
> the database, and you are limited to about 64 values. In some projects
> that's an acceptable constraint. I tend to like auxilliary tables
> better because I can easily add an admin interface to an app to allow
> users with sufficient permission to add their own values as needed
> without granting them access to muck around with the actual table
> structure, I'm NOT limited to 64 values, and indexes work even in 1:m
> (SET) cases in addition to 1:1 (ENUM) relationships.
>
(Continue reading)

Ashley Sheridan | 1 Mar 2009 01:18
Picon

Re: Re: [PHP-DB] How important is your Express or Web Edition database? Please weigh in--

On Sat, 2009-02-28 at 16:08 -0800, Waynn Lue wrote:
> Plus, last time I checked, adding an enum required a full rebuild of
> the table, while having an auxiliary table allows it to happen much
> more quickly.
> 
> Waynn
> 
> On 2/28/09, Andrew Ballard <aballard <at> gmail.com> wrote:
> > On Sat, Feb 28, 2009 at 5:13 AM, Ashley Sheridan
> > <ash <at> ashleysheridan.co.uk> wrote:
> >> On Sat, 2009-02-28 at 01:04 -0500, Andrew Ballard wrote:
> >>> On Fri, Feb 27, 2009 at 7:32 PM, Ashley Sheridan
> >>> <ash <at> ashleysheridan.co.uk> wrote:
> >> I absolutely love enum datatypes; they allow you to use string values
> >> but internally stores them as numbers, and prevents the wrong data from
> >> being inserted. Much simpler than joining extra tables of values onto
> >> it.
> >
> > Oh, I know why programmers love them. I like them for a lot of the
> > same reasons, but I'm enough of a DBA that I'm still not sure they are
> > a very good idea in a SQL database. Granted, indexes on an ENUM column
> > will be more useful than on SET columns, but what do you do when you
> > need to add a value to the list? You have to have permission to modify
> > the database, and you are limited to about 64 values. In some projects
> > that's an acceptable constraint. I tend to like auxilliary tables
> > better because I can easily add an admin interface to an app to allow
> > users with sufficient permission to add their own values as needed
> > without granting them access to muck around with the actual table
> > structure, I'm NOT limited to 64 values, and indexes work even in 1:m
> > (SET) cases in addition to 1:1 (ENUM) relationships.
(Continue reading)

Shawn McKenzie | 1 Mar 2009 01:57
Favicon

Re: Re: "use strict" or similar in PHP?

Stuart wrote:
> 2009/2/28 Shawn McKenzie <nospam <at> mckenzies.net>
> 
>> Robert Cummings wrote:
>>> On Sat, 2009-02-28 at 00:11 +0000, Ashley Sheridan wrote:
>>>> On Fri, 2009-02-27 at 14:32 -0500, Robert Cummings wrote:
>>>>> On Sat, 2009-02-28 at 00:02 +0600, 9el wrote:
>> -----------------------------------------------------------------------
>>>>>> Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
>>>>>> a Free CD of Ubuntu mailed to your door without any cost. Visit :
>>>>>> www.ubuntu.com
>>>>>> ----------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 27, 2009 at 11:46 PM, Robert Cummings <
>> robert <at> interjinn.com>wrote:
>>>>>>> On Fri, 2009-02-27 at 09:28 -0700, LuKreme wrote:
>>>>>>>> On Feb 27, 2009, at 6:12, Hans Schultz <h.schultz78 <at> yahoo.com>
>> wrote:
>>>>>>>>> Hahahah,I was thinking the same thing
>>>>>>>> The trouble is most people mean "compile a source file to an
>>>>>>>> executable binary" when they sat compile. By this measure, PHP does
>>>>>>>> not compile.
>>>>>>> I add the following to the top of my PHP shell scripts:
>>>>>>>
>>>>>>>    #!/usr/bin/php -qC
>>>>>>>
>>>>>>> Then I do the following:
>>>>>>>
>>>>>>>    chmod 775 script.php
(Continue reading)

Stuart | 1 Mar 2009 02:05
Picon

Re: Re: "use strict" or similar in PHP?

2009/3/1 Shawn McKenzie <nospam <at> mckenzies.net>

> Stuart wrote:
> > 2009/2/28 Shawn McKenzie <nospam <at> mckenzies.net>
> >
> >> Robert Cummings wrote:
> >>> On Sat, 2009-02-28 at 00:11 +0000, Ashley Sheridan wrote:
> >>>> On Fri, 2009-02-27 at 14:32 -0500, Robert Cummings wrote:
> >>>>> On Sat, 2009-02-28 at 00:02 +0600, 9el wrote:
> >> -----------------------------------------------------------------------
> >>>>>> Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live.
> Get
> >>>>>> a Free CD of Ubuntu mailed to your door without any cost. Visit :
> >>>>>> www.ubuntu.com
> >>>>>>
> ----------------------------------------------------------------------
> >>>>>>
> >>>>>>
> >>>>>> On Fri, Feb 27, 2009 at 11:46 PM, Robert Cummings <
> >> robert <at> interjinn.com>wrote:
> >>>>>>> On Fri, 2009-02-27 at 09:28 -0700, LuKreme wrote:
> >>>>>>>> On Feb 27, 2009, at 6:12, Hans Schultz <h.schultz78 <at> yahoo.com>
> >> wrote:
> >>>>>>>>> Hahahah,I was thinking the same thing
> >>>>>>>> The trouble is most people mean "compile a source file to an
> >>>>>>>> executable binary" when they sat compile. By this measure, PHP
> does
> >>>>>>>> not compile.
> >>>>>>> I add the following to the top of my PHP shell scripts:
> >>>>>>>
(Continue reading)

Shawn McKenzie | 1 Mar 2009 02:11
Favicon

Re: Re: "use strict" or similar in PHP?

Stuart wrote:
> 2009/3/1 Shawn McKenzie <nospam <at> mckenzies.net>
> 
>> Stuart wrote:
>>> 2009/2/28 Shawn McKenzie <nospam <at> mckenzies.net>
>>>
>>>> Robert Cummings wrote:
>>>>> On Sat, 2009-02-28 at 00:11 +0000, Ashley Sheridan wrote:
>>>>>> On Fri, 2009-02-27 at 14:32 -0500, Robert Cummings wrote:
>>>>>>> On Sat, 2009-02-28 at 00:02 +0600, 9el wrote:
>>>> -----------------------------------------------------------------------
>>>>>>>> Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live.
>> Get
>>>>>>>> a Free CD of Ubuntu mailed to your door without any cost. Visit :
>>>>>>>> www.ubuntu.com
>>>>>>>>
>> ----------------------------------------------------------------------
>>>>>>>>
>>>>>>>> On Fri, Feb 27, 2009 at 11:46 PM, Robert Cummings <
>>>> robert <at> interjinn.com>wrote:
>>>>>>>>> On Fri, 2009-02-27 at 09:28 -0700, LuKreme wrote:
>>>>>>>>>> On Feb 27, 2009, at 6:12, Hans Schultz <h.schultz78 <at> yahoo.com>
>>>> wrote:
>>>>>>>>>>> Hahahah,I was thinking the same thing
>>>>>>>>>> The trouble is most people mean "compile a source file to an
>>>>>>>>>> executable binary" when they sat compile. By this measure, PHP
>> does
>>>>>>>>>> not compile.
>>>>>>>>> I add the following to the top of my PHP shell scripts:
>>>>>>>>>
(Continue reading)

Michael A. Peters | 1 Mar 2009 02:43
Picon

Re: Re: "use strict" or similar in PHP?

Stuart wrote:

> 
> As far as error checking goes the PHP engine performs syntactical checks
> during compile time but due to the highly flexible nature of the language
> it's not possible to do most error checking until runtime.

I don't know (or care) how to do it but I suspect that if you put all 
output into a buffer or object (ala DOMDocument class) you could refuse 
to print the document to the requesting client if any errors were thrown 
during the creation of the document.

DOMDocument sure makes (at least for me) code easier to read because you 
aren't mixing html and php.

--

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

Paul M Foster | 1 Mar 2009 06:39
Favicon

Re: Get a list of column field names from a MS Access table

On Sat, Feb 28, 2009 at 06:54:25PM -0500, Andrew Ballard wrote:

> On Sat, Feb 28, 2009 at 6:08 PM, Paul M Foster <paulf <at> quillandmouse.com>
> wrote:
> > On Sat, Feb 28, 2009 at 12:41:12AM +0000, Ashley Sheridan wrote:
> >
> >> On Fri, 2009-02-27 at 16:58 -0500, Bastien Koert wrote:
> >
> > <snip>
> >
> >> That'll just return an empty result set, as in empty and with no fields
> >> output! In MySQL you can do this:
> >>
> >> SELECT column_name FROM information_schema.columns WHERE table_name =
> >> 'table_name'
> >>
> >> this might help with doing the same for M$Access?
> >>
> >
> > This is the SQL standard way of doing this. Both MySQL and PostgreSQL
> > support it. Don't know about MSSQL.
> >
> > Paul
> > --
> > Paul M. Foster
> >
> 
> Access is not MSSQL, and I'd hardly consider it standard SQL either.
> :-) To even connect to it from PHP, I think you'd need to either use a
> generic ODBC library or else the COM or DOTNET libraries to use
(Continue reading)

bruce | 1 Mar 2009 06:46
Picon
Favicon

file locking...

Hi.

Got a bit of a question/issue that I'm trying to resolve. I'm asking this of
a few groups so bear with me.

I'm considering a situation where I have multiple processes running, and
each process is going to access a number of files in a dir. Each process
accesses a unique group of files, and then writes the group of files to
another dir. I can easily handle this by using a form of locking, where I
have the processes lock/read a file and only access the group of files in
the dir based on the  open/free status of the lockfile.

However, the issue with the approach is that it's somewhat synchronous. I'm
looking for something that might be more asynchronous/parallel, in that I'd
like to have multiple processes each access a unique group of files from the
given dir as fast as possible.

So.. Any thoughts/pointers/comments would be greatly appreciated. Any
pointers to academic research, etc.. would be useful.

thanks

--

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

Ashley Sheridan | 1 Mar 2009 09:09
Picon

Re: file locking...

On Sat, 2009-02-28 at 21:46 -0800, bruce wrote:
> Hi.
> 
> Got a bit of a question/issue that I'm trying to resolve. I'm asking this of
> a few groups so bear with me.
> 
> I'm considering a situation where I have multiple processes running, and
> each process is going to access a number of files in a dir. Each process
> accesses a unique group of files, and then writes the group of files to
> another dir. I can easily handle this by using a form of locking, where I
> have the processes lock/read a file and only access the group of files in
> the dir based on the  open/free status of the lockfile.
> 
> However, the issue with the approach is that it's somewhat synchronous. I'm
> looking for something that might be more asynchronous/parallel, in that I'd
> like to have multiple processes each access a unique group of files from the
> given dir as fast as possible.
> 
> So.. Any thoughts/pointers/comments would be greatly appreciated. Any
> pointers to academic research, etc.. would be useful.
> 
> thanks
> 
> 
> 
> 
You could do it one of several ways:

1. Have the files actually written to a subversion/git repository, and
let that handle differences.
(Continue reading)

Jim Lucas | 1 Mar 2009 09:16

Re: Re: "use strict" or similar in PHP?

Stuart wrote:
> 2009/3/1 Shawn McKenzie <nospam <at> mckenzies.net>
> 
>> Stuart wrote:
>>> 2009/2/28 Shawn McKenzie <nospam <at> mckenzies.net>
>>>
>>>> Robert Cummings wrote:
>>>>> On Sat, 2009-02-28 at 00:11 +0000, Ashley Sheridan wrote:
>>>>>> On Fri, 2009-02-27 at 14:32 -0500, Robert Cummings wrote:
>>>>>>> On Sat, 2009-02-28 at 00:02 +0600, 9el wrote:
>>>> -----------------------------------------------------------------------
>>>>>>>> Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live.
>> Get
>>>>>>>> a Free CD of Ubuntu mailed to your door without any cost. Visit :
>>>>>>>> www.ubuntu.com
>>>>>>>>
>> ----------------------------------------------------------------------
>>>>>>>>
>>>>>>>> On Fri, Feb 27, 2009 at 11:46 PM, Robert Cummings <
>>>> robert <at> interjinn.com>wrote:
>>>>>>>>> On Fri, 2009-02-27 at 09:28 -0700, LuKreme wrote:
>>>>>>>>>> On Feb 27, 2009, at 6:12, Hans Schultz <h.schultz78 <at> yahoo.com>
>>>> wrote:
>>>>>>>>>>> Hahahah,I was thinking the same thing
>>>>>>>>>> The trouble is most people mean "compile a source file to an
>>>>>>>>>> executable binary" when they sat compile. By this measure, PHP
>> does
>>>>>>>>>> not compile.
>>>>>>>>> I add the following to the top of my PHP shell scripts:
>>>>>>>>>
(Continue reading)


Gmane