[nycphp-talk] PHP and MySQL projects to include in a portfolio
david.ngo
david.ngo at benefitscheckup.org
Fri Sep 8 12:00:54 EDT 2006
I have dealt with this issue before of having infinite levels and branches
within a hierarchy. To extend Peter's note, follow his table structure,
however for the Available_Categories table you need to store a parent_id to
know where in the hierarchy your item fits. So you would have:
"Available_Categories" table fields:
ID
Parent_id
Category_Name
For example you have (1)IT->(7)Software->(20)Programming->(40)PHP programmer
with the corresponding id next to them in parenthesis.
Your table available categories would contain
id parent_id category_name
1 NULL IT
7 1 Software
20 7 Programming
40 20 PHP programmer
This is one alternative to this solution, but if you need to display the
entire branch of all the parents of PHP programmer you would have to do 3
sql queries to get them all. You can see how processing for this quickly
gets out of control if you go many levels deep.
My recommendation is to follow the Modified Preorder Tree Traversal
solution. Read up on it here,
http://www.sitepoint.com/article/hierarchical-data-database/2. Notice that
the parent_id field has been replaced with the left_id and right_id fields.
This will allow you go get all the parents of a node with just 1 sql query.
-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of talk-request at lists.nyphp.org
Sent: Friday, September 08, 2006 11:21 AM
To: talk at lists.nyphp.org
Subject: talk Digest, Vol 40, Issue 10
Send talk mailing list submissions to
talk at lists.nyphp.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.nyphp.org/mailman/listinfo/talk
or, via email, send a message with subject or body 'help' to
talk-request at lists.nyphp.org
You can reach the person managing the list at
talk-owner at lists.nyphp.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of talk digest..."
Today's Topics:
1. Re: Cake v. Symfony (Paul M Jones)
2. Re: Multipage forms -- sessions or hidden variables (Rolan Yang)
3. Re: Multipage forms -- sessions or hidden variables
(jface at mercenarylabs.com)
4. Re: Multipage forms -- sessions or hidden variables
(edward potter)
5. Re: Cake v. Symfony (Peter Sawczynec)
6. PHP and MySQL projects to include in a portfolio. (Neil Argent)
7. Re: PHP and MySQL projects to include in a portfolio. (LK)
8. Re: Cake v. Symfony (David Mintz)
9. Re: PHP and MySQL projects to include in a portfolio.
(Peter Sawczynec)
----------------------------------------------------------------------
Message: 1
Date: Thu, 7 Sep 2006 17:36:00 -0500
From: Paul M Jones <pmjones88 at gmail.com>
Subject: Re: [nycphp-talk] Cake v. Symfony
To: NYPHP Talk <talk at lists.nyphp.org>
Message-ID: <8F794CE1-13E4-4735-A6C8-7A32BC2B23B0 at gmail.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Sep 7, 2006, at 4:43 PM, Ajai Khattri wrote:
> Having spent ages looking at all these several months ago, to save
> bandwidth, I have a list:
>
> Symfony
> CakePHP
> Seagull (seagullproject.org)
> Prado
> SolarPHP
> Cerebral Cortex (crtx.org)
> Savant (phpsavant.com)
Much as I appreciate the plug, Savant is more a template/presentation-
logic system than a framework.
And IIRC, Cortex is officially defunct; Davey gave it up in favor of
Zend Framework. Via Google Cache:
<http://72.14.209.104/search?q=cache:_vh2DrrKkZIJ:pixelated-
dreams.com/archives/206-All-for-naught....html+pixelated+dreams
+cerebral+cortex>
-- pmj
------------------------------
Message: 2
Date: Thu, 07 Sep 2006 20:25:40 -0400
From: Rolan Yang <rolan at omnistep.com>
Subject: Re: [nycphp-talk] Multipage forms -- sessions or hidden
variables
To: NYPHP Talk <talk at lists.nyphp.org>
Message-ID: <4500B884.5090300 at omnistep.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
In my experience, storing/passing all variables via server-side sessions
with a mysql based session handler simplifies many things.
~Rolan
Cliff Hirsch wrote:
>
> I?m working on a simple multi-page shopping cart. Any thoughts on the
> merits of hidden variables versus session variables for moving between
> pages. I don?t want to use a hidden variable for a CC #, unless ever
> page is secure. Even than, it seems like a poor idea. And I am
> interested in minimizing the session load, which translates to extra
> DB load. Thoughts?
>
> Cliff
>
> _______________________________
> *Pinestream Communications, Inc.*
> Publisher of /Semiconductor Times/ & /Telecom Trends/
> 52 Pine Street, Weston, MA 02493 USA
> Tel: 781.647.8800, Fax: 781.647.8825
> http://www.pinestream.com <http://www.pinestream.com/>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
------------------------------
Message: 3
Date: Thu, 7 Sep 2006 20:43:56 -0400
From: <jface at mercenarylabs.com>
Subject: Re: [nycphp-talk] Multipage forms -- sessions or hidden
variables
To: NYPHP Talk <talk at lists.nyphp.org>
Message-ID: <0f85908b28c019d486510b862c0f8689 at localhost>
Content-Type: text/plain; charset="UTF-8"
I'm admittedly not so well-versed on security issues, but why not hash the
CC# (with crypt() or something similar) and store it in sql temporarily? You
could store the corresponding sql key id in the session.
On Thu, 07 Sep 2006 20:25:40 -0400, Rolan Yang <rolan at omnistep.com> wrote:
> In my experience, storing/passing all variables via server-side sessions
> with a mysql based session handler simplifies many things.
>
> ~Rolan
>
> Cliff Hirsch wrote:
>>
>> I?m working on a simple multi-page shopping cart. Any thoughts on the
>> merits of hidden variables versus session variables for moving between
>> pages. I don?t want to use a hidden variable for a CC #, unless ever
>> page is secure. Even than, it seems like a poor idea. And I am
>> interested in minimizing the session load, which translates to extra
>> DB load. Thoughts?
>>
>> Cliff
>>
>> _______________________________
>> *Pinestream Communications, Inc.*
>> Publisher of /Semiconductor Times/ & /Telecom Trends/
>> 52 Pine Street, Weston, MA 02493 USA
>> Tel: 781.647.8800, Fax: 781.647.8825
>> http://www.pinestream.com <http://www.pinestream.com/>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> New York PHP Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
>>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
------------------------------
Message: 4
Date: Thu, 7 Sep 2006 20:47:39 -0400
From: "edward potter" <edwardpotter at gmail.com>
Subject: Re: [nycphp-talk] Multipage forms -- sessions or hidden
variables
To: "NYPHP Talk" <talk at lists.nyphp.org>
Message-ID:
<c5949a380609071747s638baa22y6348c5d17e1ca0b0 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Sessions are very easy to work with. I think your best bet.
:-) ed
On 9/7/06, Rolan Yang <rolan at omnistep.com> wrote:
> In my experience, storing/passing all variables via server-side sessions
> with a mysql based session handler simplifies many things.
>
> ~Rolan
>
> Cliff Hirsch wrote:
> >
> > I'm working on a simple multi-page shopping cart. Any thoughts on the
> > merits of hidden variables versus session variables for moving between
> > pages. I don't want to use a hidden variable for a CC #, unless ever
> > page is secure. Even than, it seems like a poor idea. And I am
> > interested in minimizing the session load, which translates to extra
> > DB load. Thoughts?
> >
> > Cliff
> >
> > _______________________________
> > *Pinestream Communications, Inc.*
> > Publisher of /Semiconductor Times/ & /Telecom Trends/
> > 52 Pine Street, Weston, MA 02493 USA
> > Tel: 781.647.8800, Fax: 781.647.8825
> > http://www.pinestream.com <http://www.pinestream.com/>
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
> >
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
--
My Blog: http://www.utopiaparkway.com
My Web Projects: http://flickr.com/photos/86842405@N00/
My Store: The Hipsters guide to the good life.
http://astore.amazon.com/httpwwwutopic-20
------------------------------
Message: 5
Date: Thu, 7 Sep 2006 21:48:38 -0400
From: "Peter Sawczynec" <ps at pswebcode.com>
Subject: Re: [nycphp-talk] Cake v. Symfony
To: "'NYPHP Talk'" <talk at lists.nyphp.org>
Message-ID: <002c01c6d2e8$e7f77e00$6401a8c0 at Rubicon>
Content-Type: text/plain; charset="us-ascii"
Whether one examines fairly generic concepts like Joomla, phpNuke,
dotProject or TYPO3. Or one looks at the generic frameworks.
Or one looks at the sourceforge.net collection of tools and projects. It
might be proper to observe that there is
quite sufficient baseline "generic" PHP product out there.
And that these worldwide, many years long collective collaborations were
likely originally engendered predominantly to propel
PHP development from 0 - 60, causing PHP to rapidly appear as a competitive,
diverse, solutions-oriented code framework when
compared to JAVA and ASP.
Maybe these PHP projects have achieved what was originally needed to
basically propel PHP to an IT takes note status.
Now it may be time for new talents to focus on the next evolutionary
competitive step and that would be to tie together, maximize, enhance and
compound all these "generic" projects and spin them into very rich, full
package commercial enterprise-wide solutions with a bit more out of the box
readiness to meet the expectations of known market segments that need and
buy full scale (verily even expensive and satisfyingly profitable) web
application solutions.
Might there not be a business case that shows the there is sufficient
competitive cause now -- that PHP developers need -- more access to free or
low-cost well done projects that really answer contemporary commercial
business needs.
No collective of developers needs to hold back anymore and think: "Well, if
we want to create a successful project that is going to get used a lot, we
need to make this non-specific grey box set of features and functions for a
hypothetical vast generic market of scientifically precise programmers to
use." To the contrary, the collective of developers should now be thinking:
"What are some of the present day ripe business categories that have
exploded onto the internet and PHP developers could use targeted, base code
projects that meet the needs of an ever expanding, feature hungry mass of
potential PHP customers who are right now paying way too much to other
programmer/code languages."
New PHP projects really need to cohesively, convincingly and accurately do
modern expected things that most customers are now desiring as a matter of
course, such as: streaming media, perform bulk emails, collect and create
RSS, encrypt cookies/session, registration/login/preferences, meeting
calendar, customer inquiries center, FAQ, online chat/IM, help desk/trouble
ticket, mapping, weather, and even interface with bar codes.
PHP could use to take and grow market share in all the following business
segments:
Chamber of Commerce
Convention Center
Visitor's Bureau
Supermarkets
Television Station
Automobile Dealership
Yacht Dealership
Cruise Line
Venture Capital Firm
Museum
Resort / Resort Chain
Hotel / Hotel Chain
Movie Theatre Chain
Performing Arts Center
Dance Troupe
Theatre Ensemble
Circus
National Park
Day School Site
Grade School / High School Site
Real Estate Agency
Real Estate Residential Developer
Real Estate Commercial Developer
Accounting Firm
Law Firm
Politician
Political Group
Fundraiser
Trucking Firm
Tanker Firm
Police Department
Fire Department
Art Gallery Chain
Even bigger and more ambitious:
News Site with multimedia
Weather Service
Traffic Site
Media Download Site
Software Download Site
Photo Sharing Site
Train Scheduler
Web Cam Viewer Site
Expedition Chronicler
Digital Movie Download Site
If I am off base and you know a full featured opensource project that fills
the gap in the above business segments, just list them and everyone will be
helped by what might otherwise be interpreted as shameless PHP project
publicity.
Warmest regards,
Peter Sawczynec,
Technology Director
PSWebcode
_Design & Interface
_Ecommerce
_Database Management
ps at pswebcode.com
646.316.3678
www.pswebcode.com
-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Paul M Jones
Sent: Thursday, September 07, 2006 6:36 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Cake v. Symfony
On Sep 7, 2006, at 4:43 PM, Ajai Khattri wrote:
> Having spent ages looking at all these several months ago, to save
> bandwidth, I have a list:
>
> Symfony
> CakePHP
> Seagull (seagullproject.org)
> Prado
> SolarPHP
> Cerebral Cortex (crtx.org)
> Savant (phpsavant.com)
Much as I appreciate the plug, Savant is more a template/presentation-
logic system than a framework.
And IIRC, Cortex is officially defunct; Davey gave it up in favor of
Zend Framework. Via Google Cache:
<http://72.14.209.104/search?q=cache:_vh2DrrKkZIJ:pixelated-
dreams.com/archives/206-All-for-naught....html+pixelated+dreams
+cerebral+cortex>
-- pmj
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
------------------------------
Message: 6
Date: Fri, 08 Sep 2006 15:04:08 +0100
From: Neil Argent <neil.argent at gmail.com>
Subject: [nycphp-talk] PHP and MySQL projects to include in a
portfolio.
To: talk at lists.nyphp.org
Message-ID: <45017858.6090106 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Following an absence from work due a long term illness, I have just
completed the CIW Master Designer qualification to assist me in my to
return to work.
To facilitate my return, it is apparent that I need to learn PHP and
demonstrate its use with and without MySQL.
Could you suggest examples that I should write and use as part of my
portfolio.
I am not looking for detailed descriptions, just brief outlines of
projects that will demonstrate the skills being considered for PHP
employment at this time.
I have some experience of using PHP5 and PHP4 with MySQL, and a lot more
experience in C++, so I am not coming at it as a complete programming
novice.
Thanks.
------------------------------
Message: 7
Date: Fri, 8 Sep 2006 07:35:22 -0700 (PDT)
From: LK <lk613m at yahoo.com>
Subject: Re: [nycphp-talk] PHP and MySQL projects to include in a
portfolio.
To: talk at lists.nyphp.org
Message-ID: <20060908143522.76464.qmail at web53305.mail.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1
Neil,
I happen to be struggling now with a database issue that might interest you
and
I'd welcome and appreciate suggestions from the group.
My issue is: With a relational database how do you represent and navigate a
tree with unlimited number of levels and branches ? Example: categorization
hierarchy. Let's say you have a table of Employees. Now you want to
categorize
them by Job_Type: clerk, secretary, manager, etc. But each one of these can
be
further sub-categorized, e.g. Manager: production, purchasing, accounting
etc.
Each one of those can also be sub-categorized in an unlimited recursive
fashion.
One could try constructing a table with columns: level_0 level_1 level_2
etc.
where level_0 holds the 0-th level categories, level_1 - first level
subcategories, etc. But what if the number of category levels is potentially
unlimited - what do you do then?
Seems like this must have been dealt with before somewhere, and any
suggestions
and pointers would be greatly appreciated.
Leo Kokin
--- Neil Argent <neil.argent at gmail.com> wrote:
> Following an absence from work due a long term illness, I have just
> completed the CIW Master Designer qualification to assist me in my to
> return to work.
>
> To facilitate my return, it is apparent that I need to learn PHP and
> demonstrate its use with and without MySQL.
>
> Could you suggest examples that I should write and use as part of my
> portfolio.
>
> I am not looking for detailed descriptions, just brief outlines of
> projects that will demonstrate the skills being considered for PHP
> employment at this time.
>
> I have some experience of using PHP5 and PHP4 with MySQL, and a lot more
> experience in C++, so I am not coming at it as a complete programming
> novice.
>
> Thanks.
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------------
Message: 8
Date: Fri, 8 Sep 2006 11:00:01 -0400 (EDT)
From: David Mintz <dmintz at davidmintz.org>
Subject: Re: [nycphp-talk] Cake v. Symfony
To: NYPHP Talk <talk at lists.nyphp.org>
Message-ID: <Pine.BSF.4.58.0609081057570.97991 at emra.pair.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 7 Sep 2006, inforequest wrote:
> David Mintz dmintz-at-davidmintz.org |nyphp dev/internal group use| wrote:
> >inforequest: I thought you were a big Rails fan and Rails is so big on
> >convention over configuration, and Cake is very much in that --
tradition?
> >whatever -- whereas Symfony, it appears, makes you write or at least
> >edit reams of YAML. I know, I gotta experience it (nudge nudge).
> >
> >
> Me? A Rails fan? Far from it. Are you one of those racist New Yorkers,
> calling me a Rails fan just because I'm in Seattle? Geesh.
Oops, my bad. My memory must have confused you with one of the other gurus
who was praising RoR on this list a while back.
---
David Mintz
http://davidmintz.org/
Amendment IV
The right of the people to be secure in their
persons, houses, papers, and effects, against
unreasonable searches and seizures, shall not be
violated, and no Warrants shall issue, but upon
probable cause, supported by Oath or affirmation,
and particularly describing the place to be
searched, and the persons or things to be seized.
------------------------------
Message: 9
Date: Fri, 8 Sep 2006 11:20:36 -0400
From: "Peter Sawczynec" <ps at pswebcode.com>
Subject: Re: [nycphp-talk] PHP and MySQL projects to include in a
portfolio.
To: "'NYPHP Talk'" <talk at lists.nyphp.org>
Message-ID: <002f01c6d35a$55dad540$6401a8c0 at Rubicon>
Content-Type: text/plain; charset="us-ascii"
You should further study the topic: 'database normalization' to get more
grasp of
how to handle table relationships as the industry has generally settled on.
The following type of three table structure should offer solution to your
issue.
Roughly creating as follows should get you started.
"Employee" table fields:
ID
Employee_ID
First_Name
Last_Name
Address
"Employee_Attrributes" table fields:
ID
Employee_ID
Category_ID
"Available_Categories" table fields:
ID
Category_Name
"Employee" table and "Employee_Attributes" tables have an infinitely
expandable, one to many, primary key to foreign key relationship.
Save a new row entry into "Employee_Attributes" table every time an Employee
is added to a new category.
Then perform multi-table SELECT queries using JOIN, LEFT JOIN, or RIGHT JOIN
when you need to get the Employee category info.
That should tide you over.
Warmest regards,
Peter Sawczynec,
Technology Director
PSWebcode
_Design & Interface
_Ecommerce
_Database Management
ps at pswebcode.com
646.316.3678
www.pswebcode.com
-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of LK
Sent: Friday, September 08, 2006 10:35 AM
To: talk at lists.nyphp.org
Subject: Re: [nycphp-talk] PHP and MySQL projects to include in a portfolio.
Neil,
I happen to be struggling now with a database issue that might interest you
and I'd welcome and appreciate suggestions from the group.
My issue is: With a relational database how do you represent and navigate a
tree with unlimited number of levels and branches ? Example: categorization
hierarchy. Let's say you have a table of Employees. Now you want to
categorize them by Job_Type: clerk, secretary, manager, etc. But each one of
these can be further sub-categorized, e.g. Manager: production, purchasing,
accounting etc. Each one of those can also be sub-categorized in an
unlimited recursive fashion.
One could try constructing a table with columns: level_0 level_1 level_2
etc. where level_0 holds the 0-th level categories, level_1 - first level
subcategories, etc. But what if the number of category levels is potentially
unlimited - what do you do then?
Seems like this must have been dealt with before somewhere, and any
suggestions and pointers would be greatly appreciated.
Leo Kokin
--- Neil Argent <neil.argent at gmail.com> wrote:
> Following an absence from work due a long term illness, I have just
> completed the CIW Master Designer qualification to assist me in my to
> return to work.
>
> To facilitate my return, it is apparent that I need to learn PHP and
> demonstrate its use with and without MySQL.
>
> Could you suggest examples that I should write and use as part of my
> portfolio.
>
> I am not looking for detailed descriptions, just brief outlines of
> projects that will demonstrate the skills being considered for PHP
> employment at this time.
>
> I have some experience of using PHP5 and PHP4 with MySQL, and a lot
> more
> experience in C++, so I am not coming at it as a complete programming
> novice.
>
> Thanks.
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
------------------------------
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk
End of talk Digest, Vol 40, Issue 10
************************************
More information about the talk
mailing list