From dcech at phpwerx.net Tue Sep 1 08:13:08 2009 From: dcech at phpwerx.net (Dan Cech) Date: Tue, 01 Sep 2009 08:13:08 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: <4A9C9606.8030309@nyphp.com> References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> Message-ID: <4A9D0FD4.3090706@phpwerx.net> Michael Southwell wrote: > It's always seemed easier and clearer to me to use WHERE instead of JOIN > (where the table IDs are indeed named id, and the foreign keys are > labeled with the table name): > > SELECT product_name, vendor_name > FROM product, vendor > WHERE vendor.id = product.vendor_id The problem with this approach is that you end up with the join conditions and the 'real' selection criteria mashed together. SELECT product_name, vendor_name, category_name FROM product, vendor, category WHERE vendor.id = product.vendor_id AND price > 50 AND category.id = product.category_id AND color = 'red' vs SELECT product_name, vendor_name, category_name FROM product JOIN vendor ON vendor.id = product.vendor_id JOIN category ON category.id = product.category_id WHERE price > 50 AND color = 'red' I mixed up the order of the WHERE elements in the first query for the purposes of this example, but I have seen stuff like that in production code. Dan From tedd at sperling.com Tue Sep 1 08:58:29 2009 From: tedd at sperling.com (tedd) Date: Tue, 1 Sep 2009 08:58:29 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: <4A9D0FD4.3090706@phpwerx.net> References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: At 8:13 AM -0400 9/1/09, Dan Cech wrote: >Michael Southwell wrote: >> It's always seemed easier and clearer to me to use WHERE instead of JOIN >> (where the table IDs are indeed named id, and the foreign keys are >> labeled with the table name): >> >> SELECT product_name, vendor_name >> FROM product, vendor >> WHERE vendor.id = product.vendor_id > >The problem with this approach is that you end up with the join >conditions and the 'real' selection criteria mashed together. > >SELECT product_name, vendor_name, category_name >FROM product, vendor, category >WHERE vendor.id = product.vendor_id AND price > 50 AND category.id = >product.category_id AND color = 'red' > >vs > >SELECT product_name, vendor_name, category_name >FROM product >JOIN vendor ON vendor.id = product.vendor_id >JOIN category ON category.id = product.category_id >WHERE price > 50 AND color = 'red' > >I mixed up the order of the WHERE elements in the first query for the >purposes of this example, but I have seen stuff like that in production >code. > >Dan Dan: I need to understand joins much better than I do now because the first query I fully understand while the second I don't. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From lists at enobrev.com Tue Sep 1 09:11:48 2009 From: lists at enobrev.com (Mark Armendariz) Date: Tue, 1 Sep 2009 09:11:48 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: <1251721350.28247@coral.he.net> References: <1251721350.28247@coral.he.net> Message-ID: <58f08dcf0909010611h2ee515abrd52476748dcd9c42@mail.gmail.com> On Mon, Aug 31, 2009 at 8:22 AM, Kristina D. H. Anderson wrote: > I'm wondering why both phpMyAdmin and a number of the boilerplate PHP5 > frameworks' database code bases that I've seen all seem to be pushing > the use of these delimiters around really, every single table and field > name at all times, whether required or not. ?I hadn't given it much > thought until this thread but the amount of them that I've seen over > the past year or so has skyrocketed. I think the idea is less a matter of promotion and more to let the programmer use whatever table / column names they prefer regardless of best practices. If they do it for everything they don't have to maintain a list of reserved words, which may very well change between versions. I personally prefer prefixing column names with table names (person_first_name, location_city, etc) for clarity in complex joins, but if I really had some reason to name a varchar (can't think of why), I'd prefer that my tools would allow me to do so. As for joins, I agree with Dan Cech regarding explicitly naming join types, join fields, and join conditions in the join...on rather than the conditions. Mark From dirn at dirnonline.com Tue Sep 1 09:41:11 2009 From: dirn at dirnonline.com (Andy Dirnberger) Date: Tue, 1 Sep 2009 09:41:11 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: On Tue, Sep 1, 2009 at 8:58 AM, tedd wrote: > > I need to understand joins much better than I do now because the first query I fully understand while the second I don't. > Think of the WHERE clause as the filter. Use it to place restrictions on what information is returned. WHERE price > 50 AND color = 'red' In the previous example you also had things like "vendor.id = product.vendor_id." You aren't using this to filter the data. You are using it to link up two tables. This is where the JOIN clause comes in. For example, if you want a list of products with their associated vendors: FROM products INNER JOIN vendors ON products.vendor_id = vendors.id -- or whatever the fields are called To also link to an optional promotion running for a product: LEFT OUTER JOIN promotions ON products. promotion_id = promotions.id From lists at nopersonal.info Tue Sep 1 10:45:48 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Tue, 01 Sep 2009 10:45:48 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: <1251767182.2728@coral.he.net> References: <1251767182.2728@coral.he.net> Message-ID: <4A9D339C.6010102@nopersonal.info> > Essentially the thinking is that whenever you're processing code that > involves a lot of tables or a lot of queries (and returned results), > you end up with a bucketload of things named 'id' to handle. > > For instance imagine pulling out the contents of ten tables through ten > queries in one script, and all the ID fields are named, id. Or if you > are doing a SELECT query where you are pulling stuff from 3 tables at > once and all three of them have a field that you need to reference > named, you guessed it, id in all three cases. > > The thinking being that if you don't name everything 'id' then you > won't make mistakes caused by everything being named 'id'. Kristina, this is so true. The moment I started dealing with more than one table in a query I realized that I was probably going to get myself in trouble if my id names weren't more specific, so I decided to opt for the more cautious route even if it meant more typing. I was starting to waver in my resolve though, so I'm glad you explained things so well as it'll keep me from getting lazy. > The flipside of the argument is that it gets darn annoying always > forgetting whether or not in this table the ID is prodid or prod_id or > productid or whatever it may be...and you're looking it up for the 6th > time that day at 2 AM.... It's good to know the flipside--thanks. > Or you inherit a database that's got fun ID field names like > cat_subCat_xtab_id and you start cursing the day that someone came up > with the silly idea that naming ID fields 'id' was a bad idea...When > you start muttering things like "this is a database, not the Iowa > Writer's Workshop" under your breath, you know it's time to leave and > get that cold beer. LOL > And you've got to be consistent with your own database design. If you > decide now to go with prod_id, stick with that, don't all of a sudden > start to think that the underscore is "so last year", and start to use > prodid...so you don't get confused between databases. I've been guilty > of getting bored with using the same old, same old field names over and > over and making my life more difficult than it has to be... You know, a couple of times I switched my naming conventions and it was a PITA, so I can definitely see the wisdom in your advice. I finally decided to just stick with a underscore as it's second nature to me after all my years of front end production. Bev From lists at nopersonal.info Tue Sep 1 10:52:40 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Tue, 01 Sep 2009 10:52:40 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: <4A9D3538.7000908@nopersonal.info> tedd wrote: > I need to understand joins much better than I do now Same here. It's extremely helpful to see all these comparisons. Bev From tedd at sperling.com Tue Sep 1 10:55:36 2009 From: tedd at sperling.com (tedd) Date: Tue, 1 Sep 2009 10:55:36 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: At 9:41 AM -0400 9/1/09, Andy Dirnberger wrote: >On Tue, Sep 1, 2009 at 8:58 AM, tedd wrote: >> >> I need to understand joins much better than I do now because the >>first query I fully understand while the second I don't. >> > >Think of the WHERE clause as the filter. Use it to place restrictions >on what information is returned. > >WHERE price > 50 AND color = 'red' I fully understand WHERE, it's understanding how JOIN's simplify things. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ramons at gmx.net Tue Sep 1 11:38:52 2009 From: ramons at gmx.net (David Krings) Date: Tue, 01 Sep 2009 11:38:52 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: <4A9D400C.6020804@gmx.net> tedd wrote: > At 9:41 AM -0400 9/1/09, Andy Dirnberger wrote: >> On Tue, Sep 1, 2009 at 8:58 AM, tedd wrote: >>> >>> I need to understand joins much better than I do now because the >>> first query I fully understand while the second I don't. >>> >> >> Think of the WHERE clause as the filter. Use it to place restrictions >> on what information is returned. >> >> WHERE price > 50 AND color = 'red' > > I fully understand WHERE, it's understanding how JOIN's simplify things. > Well, there are different types of joins. The Where join always gives an inner join - says someone who didn't really get joins either. Using the join makes things to be more systematic, which will help a lot when you join across a dozen tables and use Where filters that are based on the result of other queries. It might just be that we never came across such complicated queries, which exposed us never to any cases where using something else than the WHERE join would make much difference. You may want to check out the pages about SQL join on W3C schools. David From jcampbell1 at gmail.com Tue Sep 1 11:46:27 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Tue, 1 Sep 2009 11:46:27 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251767182.2728@coral.he.net> <20090901022626.GA7920@panix.com> <4A9C9606.8030309@nyphp.com> <4A9D0FD4.3090706@phpwerx.net> Message-ID: <8f0676b40909010846h1a8b1f7r8408af70164d5c1c@mail.gmail.com> On Tue, Sep 1, 2009 at 10:55 AM, tedd wrote: > > I fully understand WHERE, it's understanding how JOIN's simplify things. 1. Joins make your sql more readable (and are a substatement to the FROM clause, and should be indented) 2. When you use the WHERE clause, it is easy to accidentally do a cartesian join, and select bazillions of rows during development. 3. You can change to a LEFT join as needed. Since you can't do a left join in the where clause, you might as well use the JOIN syntax everywhere. Consider SELECT user.name, COUNT(post.post_id) as post_count FROM user LEFT JOIN post USING user_id GROUP BY 1 vs SELECT user.name, COUNT(post.post_id) as post_count FROM user INNER JOIN post USING user_id GROUP BY 1 The second one can be rewritten using a WHERE clause, but the first one can't. People who don't understand the first query, end up writing stuff like: SELECT user.name, (SELECT COUNT(*) from post WHERE post.user_id=user.user_id) as post_count FROM user -john campbell From yitzchak.schaffer at gmx.com Thu Sep 3 09:54:34 2009 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Thu, 03 Sep 2009 09:54:34 -0400 Subject: [nycphp-talk] Assessing own skill level for jobs, was nyphp-jobs Junior PHP Dev Message-ID: <4A9FCA9A.6030908@gmx.com> Hi all, I periodically read through PHP job ads that call for various levels of expertise, without a solid understanding what the expectations are. I come from outside the world of formal IT education, largely self-taught in coding and server admin, so for one thing I may be missing patches of assumed "core" knowledge. Does anyone have suggestions for guidelines or app design/code samples of what's considered appropriate for an Entry-Level/Junior/Senior/OOP/whatever PHP position, or mistakes/shortcomings that may be typical or unacceptable at these levels? Many thanks, -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org From mitch.pirtle at gmail.com Thu Sep 3 12:22:50 2009 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 3 Sep 2009 12:22:50 -0400 Subject: [nycphp-talk] Assessing own skill level for jobs, was nyphp-jobs Junior PHP Dev In-Reply-To: <4A9FCA9A.6030908@gmx.com> References: <4A9FCA9A.6030908@gmx.com> Message-ID: <330532b60909030922l4c7f689eqcbf1ed747b57eae8@mail.gmail.com> Here's a Rails-based perspective, and a good one: http://pragmaticstudio.com/dreyfus This can easily be mapped to PHP. -- Mitch On Thu, Sep 3, 2009 at 9:54 AM, Yitzchak Schaffer wrote: > Hi all, > > I periodically read through PHP job ads that call for various levels of > expertise, without a solid understanding what the expectations are. ?I come > from outside the world of formal IT education, largely self-taught in coding > and server admin, so for one thing I may be missing patches of assumed > "core" knowledge. > > Does anyone have suggestions for guidelines or app design/code samples of > what's considered appropriate for an Entry-Level/Junior/Senior/OOP/whatever > PHP position, or mistakes/shortcomings that may be typical or unacceptable > at these levels? > > Many thanks, > > -- > Yitzchak Schaffer > Systems Manager > Touro College Libraries > 33 West 23rd Street > New York, NY 10010 > Tel (212) 463-0400 x5230 > Fax (212) 627-3197 > Email yitzchak.schaffer at tourolib.org > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From d at ingk.com Thu Sep 3 13:10:33 2009 From: d at ingk.com (Damion Hankejh) Date: Thu, 3 Sep 2009 12:10:33 -0500 Subject: [nycphp-talk] Assessing own skill level for jobs, was nyphp-jobs Junior PHP Dev In-Reply-To: <330532b60909030922l4c7f689eqcbf1ed747b57eae8@mail.gmail.com> References: <4A9FCA9A.6030908@gmx.com> <330532b60909030922l4c7f689eqcbf1ed747b57eae8@mail.gmail.com> Message-ID: Wow -- that's a great reference. Thanks for sharing, Mitch. The Dreyfus novice->expert method is nicely demonstrated at TED (albeit with classical music, though not entirely unrelated mathematically) http://www.ted.com/talks/benjamin_zander_on_music_and_passion.html --- Damion Hankejh | hankejh.com On Thu, Sep 3, 2009 at 11:22 AM, Mitch Pirtle wrote: > Here's a Rails-based perspective, and a good one: > > http://pragmaticstudio.com/dreyfus > > This can easily be mapped to PHP. > > -- Mitch > > On Thu, Sep 3, 2009 at 9:54 AM, Yitzchak > Schaffer wrote: > > Hi all, > > > > I periodically read through PHP job ads that call for various levels of > > expertise, without a solid understanding what the expectations are. I > come > > from outside the world of formal IT education, largely self-taught in > coding > > and server admin, so for one thing I may be missing patches of assumed > > "core" knowledge. > > > > Does anyone have suggestions for guidelines or app design/code samples of > > what's considered appropriate for an > Entry-Level/Junior/Senior/OOP/whatever > > PHP position, or mistakes/shortcomings that may be typical or > unacceptable > > at these levels? > > > > Many thanks, > > > > -- > > Yitzchak Schaffer > > Systems Manager > > Touro College Libraries > > 33 West 23rd Street > > New York, NY 10010 > > Tel (212) 463-0400 x5230 > > Fax (212) 627-3197 > > Email yitzchak.schaffer at tourolib.org > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From mangesh at ascellent.co.in Fri Sep 4 04:12:28 2009 From: mangesh at ascellent.co.in (Mangesh Sathe) Date: Fri, 4 Sep 2009 13:42:28 +0530 Subject: [nycphp-talk] website loading speed issue Message-ID: Hello everyone , This is Mangesh Sathe,India.. i have developed one erp website. As it has large amount of data it takes so much time to load. i have optimised sql queries as well as php code. Any suggestion or Anyone knows ,how can i solve this problem? any help would b appretiated -- Thanks & Regards, Mangesh Sathe -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Fri Sep 4 04:31:48 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 4 Sep 2009 04:31:48 -0400 (EDT) Subject: [nycphp-talk] website loading speed issue In-Reply-To: Message-ID: On Fri, 4 Sep 2009, Mangesh Sathe wrote: > As it has large amount of data it takes so much time to load. > i have optimised sql queries as well as php code. > > Any suggestion or Anyone knows ,how can i solve this problem? You may as well ask the meaning of life - this is a big subject and there are many many approaches and techniques, but we need more details to even begin to help. Is it the server-side PHP that is slow or your frontend code? Do you use any kind of caching? Are you using a templating library? Is this 'straight' PHP or are you using a framework / library? What kind of database? Which version of PHP? Have you looked at any profiling tools? If you're using Firebug, have you looked at using the YSlow extension to look at frontend performance? That's a good list to start with... -- Aj. From ka at kacomputerconsulting.com Fri Sep 4 06:59:46 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Fri, 4 Sep 2009 03:59:46 -0700 Subject: [nycphp-talk] website loading speed issue Message-ID: <1252061986.13068@coral.he.net> Hi Mangesh, Is this the same website you posted about a week or two back where you were using a DSN to connect to an Access database? Kristina > On Fri, 4 Sep 2009, Mangesh Sathe wrote: > > > As it has large amount of data it takes so much time to load. > > i have optimised sql queries as well as php code. > > > > Any suggestion or Anyone knows ,how can i solve this problem? > > You may as well ask the meaning of life - this is a big subject and there > are many many approaches and techniques, but we need more details to even > begin to help. > > Is it the server-side PHP that is slow or your frontend code? Do you use > any kind of caching? Are you using a templating library? Is this > 'straight' PHP or are you using a framework / library? What kind of > database? Which version of PHP? Have you looked at any profiling tools? If > you're using Firebug, have you looked at using the YSlow extension to look > at frontend performance? > > That's a good list to start with... > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From ramons at gmx.net Fri Sep 4 07:09:40 2009 From: ramons at gmx.net (David Krings) Date: Fri, 04 Sep 2009 07:09:40 -0400 Subject: [nycphp-talk] website loading speed issue In-Reply-To: References: Message-ID: <4AA0F574.5000309@gmx.net> Mangesh Sathe wrote: > As it has large amount of data it takes so much time to load. > i have optimised sql queries as well as php code. > > Any suggestion or Anyone knows ,how can i solve this problem? Get a faster web server with a bigger pipe? Do you self-host or have it hosted? Which system are your unning it on? Which web server do you use on which OS? Did you strip down code and queries? I mean, make a decision if you really need to run all these queries and all that code. Did you run an profiler against the database and your code? What exactly is slow? Do you use a lot of client side scripting (aka JavaScript)? If yes, you might find that to be your biggest slowdown. Or you can have less users access your web site....see, without more information I cannot come up with better proposals. David From brenttech at gmail.com Fri Sep 4 09:29:29 2009 From: brenttech at gmail.com (Brent Baisley) Date: Fri, 4 Sep 2009 09:29:29 -0400 Subject: [nycphp-talk] website loading speed issue In-Reply-To: References: Message-ID: <5d515c620909040629q6aa634a0j375a4444b8d606cb@mail.gmail.com> On Fri, Sep 4, 2009 at 4:12 AM, Mangesh Sathe wrote: > Hello everyone , > This is Mangesh Sathe,India.. > > i have developed one erp website. > > As it has large amount of data it takes so much time to?load. > i have? optimised sql queries as?well as php?code. You really need to find where the bottleneck is, then focus on that. If it's just a lot of code or data being moved around, then cache it and/or create summaries. If the data doesn't change that often, then you shouldn't rerun the same queries every time, just save the result. > > Any suggestion or Anyone knows ,how can i solve this problem? Your code may be optimized, but how much of it are you loading at once? Remember, PHP has reload everything on every hit. Load only what's needed for the current task. How long does it take your system to output "Hello World", without putting in any special code to handle such a simple case? Brent Baisley > > any help would b appretiated > > -- > Thanks & Regards, > Mangesh Sathe From vtbludgeon at gmail.com Fri Sep 4 10:14:08 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Fri, 4 Sep 2009 10:14:08 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <955111085-1251731473-cardhu_decombobulator_blackberry.rim.net-347125429-@bda410.bisx.prod.on.blackberry> References: <955111085-1251731473-cardhu_decombobulator_blackberry.rim.net-347125429-@bda410.bisx.prod.on.blackberry> Message-ID: <721f1cc50909040714i7f9165bn2bb506b21ac978a3@mail.gmail.com> On Mon, Aug 31, 2009 at 11:08 AM, wrote: > Late to this party, > me too, but: the way I think of it is, NULL simply means no value at all. 0 and boolean false and '' are values, for sure; NULL is, um, null. As for concrete examples, in baseball there are those two-row tables -- one for the away and one for the home team -- with columns for each of the nine innings. Before the game begins, what are the values in each of those fields? Problems can arise in PHP because if you var_dump($foo) and it's NULL, is that because it was never set, or because it was explicitly set to NULL? Or is it because you are referring to global that's out of scope because you're inside a function? PHP doesn't care because it's NULL in either case. If you have an $object and accidently lapse into French and type $objet->doSomething(), your program will puke because $objet is likewise NULL. (Assuming for the sake of the example that you haven't actually assigned an object to $objet) As for Javascript, the days of "I hate it" are behind us. You gotta do it, like it or not, in this brave new web 2.0 world. Fortunately we have an ample selection of quality frameworks to choose from, all of which, apparently, have peculiarities sufficiently irksome to some programmer, whose Hubris and Impatience greatly exceed her or his Laziness, so that s?he will write yet another one, and cast of characters grows larger. I'm a humble consumer, myself, and I'm liking JQuery. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Fri Sep 4 12:03:37 2009 From: ioplex at gmail.com (Michael B Allen) Date: Fri, 4 Sep 2009 12:03:37 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service Message-ID: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> Hi All, I have a problem. I cannot get the ISP I registered my domains with to reply to my support requests. Initially they did respond to my request and said they would look into the issue. However, I did not receive any response since. I have sent numerous emails to them in the past week and a half and tried sending new fresh ones without their ticket number so that I received their automated acknowledgment with a new ticket number (which I did receive so I know I'm not just getting filtered). But still I have not heard from them at all. If I call their hosting support group I get run around for 3 minutes before the robotic woman invariably says "we are unable to take your call right now" and hangs up. So I'm looking for opinions about ISPs that handle domain registration, domain management (basically DNS zone record updating) and some hosting (with PHP of course) and how to transfer those domains. I actually host my important stuff myself on a virtual private server so I am primarily interested in domain registration and management. The current ISP has very crude utilities for managing the domains, changing DNS and so on. It can be a chore just to login and operate their "control panel". Can anyone recommend an ISP that has the following: * good responsive support * good, easy to use utility for managing domains, registering new ones, adjusting DNS zone info, etc * affordable domain registration * affordable hosting with PHP * free hosting for small static sites Has anyone had any experience with transferring domains from one company to another? I assume I just get DNS setup with the new ISP as far as I can and then get the old ISP to transfer the domains to the new ISP. But considing I have had zero contact with the soon-to-be-old ISP, I'm wondering how I can actually get this done. It's not like I can just tell my credit card company to stop all payments - they control my domains. Also, if I paid for a domain for say 10 years, do I have to pay full price all over again? Any ideas would be appreciated. Mike -- Michael B Allen PHP Active Directory Integration http://www.ioplex.com/plexcel.html From ka at kacomputerconsulting.com Fri Sep 4 12:08:14 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Fri, 4 Sep 2009 09:08:14 -0700 Subject: [nycphp-talk] Need help understanding NULL Message-ID: <1252080494.12787@coral.he.net> References to baseball AND the Tao in a PHP post about NULL! Love it!! Kristina PS Also a jQuery fan here. > > On Mon, Aug 31, 2009 at 11:08 AM, wrote: > > > Late to this party, > > > > me too, but: > > the way I think of it is, NULL simply means no value at all. 0 and boolean > false and '' are values, for sure; NULL is, um, null. As for concrete > examples, in baseball there are those two-row tables -- one for the away and > one for the home team -- with columns for each of the nine innings. Before > the game begins, what are the values in each of those fields? > > Problems can arise in PHP because if you var_dump($foo) and it's NULL, is > that because it was never set, or because it was explicitly set to NULL? Or > is it because you are referring to global that's out of scope because you're > inside a function? PHP doesn't care because it's NULL in either case. If you > have an $object and accidently lapse into French and type > $objet->doSomething(), your program will puke because $objet is likewise > NULL. (Assuming for the sake of the example that you haven't actually > assigned an object to $objet) > > > As for Javascript, the days of "I hate it" are behind us. You gotta do it, > like it or not, in this brave new web 2.0 world. Fortunately we have an > ample selection of quality frameworks to choose from, all of which, > apparently, have peculiarities sufficiently irksome to some programmer, > whose Hubris and Impatience greatly exceed her or his Laziness, so that s?he > will write yet another one, and cast of characters grows larger. I'm a > humble consumer, myself, and I'm liking JQuery. > > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > From patrick.fee at baesystems.com Fri Sep 4 12:26:54 2009 From: patrick.fee at baesystems.com (Fee, Patrick J (US SSA)) Date: Fri, 4 Sep 2009 12:26:54 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <1252080494.12787@coral.he.net> Message-ID: <814i7o$44pt8k@dmzms99802.na.baesystems.com> As a Lifetime Baseball fan (married over home plate back in 2000), career-long web-programmer (I remember when NYPHP was first getting started), and long time stalker of this list, I second Kristina's "Love It". As programmers, we spend a lot of time using metaphors to explain what we are doing in a way easily understood by others. I've even explained the ins-and-outs of MX records by using a "delivery to an upscale apartment building" metaphor. But the baseball metaphor and Tao reference are best I've seen in a while... both for their simplicity and universal (at least in North America) appeal. And to think that I overlooked the original posting. Thanks Kristina. Thanks for making my Friday interesting. Patrick J. Fee Manager, Systems Engineering Services BAE Systems Technology Solutions & Services Cel: (240) 401-6820 Fax: (301) 231-2635 Patrick.Fee at BAESystems.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Kristina D. H. Anderson Sent: Friday, September 04, 2009 12:08 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Need help understanding NULL References to baseball AND the Tao in a PHP post about NULL! Love it!! Kristina PS Also a jQuery fan here. -----Original Message----- On Mon, Aug 31, 2009 at 11:08 AM, Hey, you're welcome, but you should really thank Mr. Mintz as he's the one who's responsible. An empty box score is a really good way to explain NULL, I gotta hand it to him. Kristina > As a Lifetime Baseball fan (married over home plate back in 2000), career-long web-programmer (I remember when NYPHP was first getting started), and long time stalker of this list, I second Kristina's "Love It". > > As programmers, we spend a lot of time using metaphors to explain what we are doing in a way easily understood by others. I've even explained the ins-and-outs of MX records by using a "delivery to an upscale apartment building" metaphor. But the baseball metaphor and Tao reference are best I've seen in a while... both for their simplicity and universal (at least in North America) appeal. > > And to think that I overlooked the original posting. Thanks Kristina. > Thanks for making my Friday interesting. > > > Patrick J. Fee > Manager, Systems Engineering Services > BAE Systems Technology Solutions & Services > Cel: (240) 401-6820 > Fax: (301) 231-2635 > Patrick.Fee at BAESystems.com > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- bounces at lists.nyphp.org] On Behalf Of Kristina D. H. Anderson > Sent: Friday, September 04, 2009 12:08 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Need help understanding NULL > > References to baseball AND the Tao in a PHP post about NULL! Love it!! > > Kristina > > PS Also a jQuery fan here. > > -----Original Message----- > On Mon, Aug 31, 2009 at 11:08 AM, > [...] the way I think of it is, NULL simply means no value at all. 0 and > boolean false and '' are values, for sure; NULL is, um, null. As for concrete examples, in baseball there are those two-row tables -- one for the > away and one for the home team -- with columns for each of the nine innings. > Before the game begins, what are the values in each of those fields? > > Problems can arise in PHP because if you var_dump($foo) and it's > NULL, is that because it was never set, or because it was explicitly set to > NULL? Or is it because you are referring to global that's out of scope because you're inside a function? PHP doesn't care because it's NULL in either case. If you have an $object and accidently lapse into French and type $objet-doSomething(), your program will puke because $objet is > likewise NULL. (Assuming for the sake of the example that you haven't actually assigned an object to $objet) > > As for Javascript, the days of "I hate it" are behind us. You gotta > do it, like it or not, in this brave new web 2.0 world. Fortunately we have > an ample selection of quality frameworks to choose from, all of which, apparently, have peculiarities sufficiently irksome to some programmer, > whose Hubris and Impatience greatly exceed her or his Laziness, so > that she will write yet another one, and cast of characters grows larger. I'm a humble consumer, myself, and I'm liking JQuery. > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From ka at kacomputerconsulting.com Fri Sep 4 12:55:44 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Fri, 4 Sep 2009 09:55:44 -0700 Subject: [nycphp-talk] Need help understanding NULL Message-ID: <1252083344.23068@coral.he.net> If anyone wants to write a Taoist poem, in pseudocode, about how NULL is like an inning of baseball yet to be played...now THAT would be cool. :) Kristina > As a Lifetime Baseball fan (married over home plate back in 2000), career-long web-programmer (I remember when NYPHP was first getting started), and long time stalker of this list, I second Kristina's "Love It". > > As programmers, we spend a lot of time using metaphors to explain what we are doing in a way easily understood by others. I've even explained the ins-and-outs of MX records by using a "delivery to an upscale apartment building" metaphor. But the baseball metaphor and Tao reference are best I've seen in a while... both for their simplicity and universal (at least in North America) appeal. > > And to think that I overlooked the original posting. Thanks Kristina. > Thanks for making my Friday interesting. > > > Patrick J. Fee > Manager, Systems Engineering Services > BAE Systems Technology Solutions & Services > Cel: (240) 401-6820 > Fax: (301) 231-2635 > Patrick.Fee at BAESystems.com > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- bounces at lists.nyphp.org] On Behalf Of Kristina D. H. Anderson > Sent: Friday, September 04, 2009 12:08 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Need help understanding NULL > > References to baseball AND the Tao in a PHP post about NULL! Love it!! > > Kristina > > PS Also a jQuery fan here. > > -----Original Message----- > On Mon, Aug 31, 2009 at 11:08 AM, > [...] the way I think of it is, NULL simply means no value at all. 0 and > boolean false and '' are values, for sure; NULL is, um, null. As for concrete examples, in baseball there are those two-row tables -- one for the > away and one for the home team -- with columns for each of the nine innings. > Before the game begins, what are the values in each of those fields? > > Problems can arise in PHP because if you var_dump($foo) and it's > NULL, is that because it was never set, or because it was explicitly set to > NULL? Or is it because you are referring to global that's out of scope because you're inside a function? PHP doesn't care because it's NULL in either case. If you have an $object and accidently lapse into French and type $objet-doSomething(), your program will puke because $objet is > likewise NULL. (Assuming for the sake of the example that you haven't actually assigned an object to $objet) > > As for Javascript, the days of "I hate it" are behind us. You gotta > do it, like it or not, in this brave new web 2.0 world. Fortunately we have > an ample selection of quality frameworks to choose from, all of which, apparently, have peculiarities sufficiently irksome to some programmer, > whose Hubris and Impatience greatly exceed her or his Laziness, so > that she will write yet another one, and cast of characters grows larger. I'm a humble consumer, myself, and I'm liking JQuery. > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From ajai at bitblit.net Fri Sep 4 13:27:28 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 4 Sep 2009 13:27:28 -0400 (EDT) Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> Message-ID: On Fri, 4 Sep 2009, Michael B Allen wrote: > So I'm looking for opinions about ISPs that handle domain > registration, domain management (basically DNS zone record updating) > and some hosting (with PHP of course) and how to transfer those > domains. I actually host my important stuff myself on a virtual > private server so I am primarily interested in domain registration and > management. The current ISP has very crude utilities for managing the > domains, changing DNS and so on. It can be a chore just to login and > operate their "control panel". Why does your *ISP* need to handle domain registration? Why not do it yourself directly with a domain registrar? Many domain registrars offer DNS too at no extra charge - that way you keep control of DNS and domains and you can manage any migrations yourself. > Also, if I paid for a domain for say 10 years, do I have to pay full > price all over again? If you are listed as the administrative contact on a domain, then you have the authority to transfer that domain to another registrar. -- Aj. From lists at nopersonal.info Fri Sep 4 13:50:43 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Fri, 04 Sep 2009 13:50:43 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <1252083344.23068@coral.he.net> References: <1252083344.23068@coral.he.net> Message-ID: <4AA15373.3040506@nopersonal.info> Kristina D. H. Anderson wrote: > If anyone wants to write a Taoist poem, in pseudocode, about how NULL > is like an inning of baseball yet to be played...now THAT would be > cool. I'll second that! Bev From seth at ghiek.com Fri Sep 4 15:27:11 2009 From: seth at ghiek.com (seth at ghiek.com) Date: Fri, 04 Sep 2009 15:27:11 -0400 Subject: [nycphp-talk] =?utf-8?q?Bad_ISP_Problem=3A_Need_New_Domain_Registr?= =?utf-8?q?ation=2C_Management_and_Hosting_=09Service?= In-Reply-To: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> References: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> Message-ID: I have about 10 sites with www.addaction.net -- and the primary reason i have expanded my sites with them is their incredibly responsibe support. they use cPanel for administration that the website owner uses (and it's quite good). rates are good -- check out their site for a standard intro special ($49/year). they are associated with a Registrar. my sites are pretty fast but i never have much action (at least my clients have never complained). hth/spirits, seth I am totally, 100% pleased with addaction. they're in nyc On Fri, 4 Sep 2009 12:03:37 -0400, Michael B Allen wrote: > Hi All, > > I have a problem. I cannot get the ISP I registered my domains with to > reply to my support requests. Initially they did respond to my request > and said they would look into the issue. However, I did not receive > any response since. I have sent numerous emails to them in the past > week and a half and tried sending new fresh ones without their ticket > number so that I received their automated acknowledgment with a new > ticket number (which I did receive so I know I'm not just getting > filtered). But still I have not heard from them at all. If I call > their hosting support group I get run around for 3 minutes before the > robotic woman invariably says "we are unable to take your call right > now" and hangs up. > > So I'm looking for opinions about ISPs that handle domain > registration, domain management (basically DNS zone record updating) > and some hosting (with PHP of course) and how to transfer those > domains. I actually host my important stuff myself on a virtual > private server so I am primarily interested in domain registration and > management. The current ISP has very crude utilities for managing the > domains, changing DNS and so on. It can be a chore just to login and > operate their "control panel". > > Can anyone recommend an ISP that has the following: > > * good responsive support > * good, easy to use utility for managing domains, registering new > ones, adjusting DNS zone info, etc > * affordable domain registration > * affordable hosting with PHP > * free hosting for small static sites > > Has anyone had any experience with transferring domains from one > company to another? I assume I just get DNS setup with the new ISP as > far as I can and then get the old ISP to transfer the domains to the > new ISP. But considing I have had zero contact with the soon-to-be-old > ISP, I'm wondering how I can actually get this done. It's not like I > can just tell my credit card company to stop all payments - they > control my domains. > > Also, if I paid for a domain for say 10 years, do I have to pay full > price all over again? > > Any ideas would be appreciated. > > Mike From ioplex at gmail.com Fri Sep 4 16:25:35 2009 From: ioplex at gmail.com (Michael B Allen) Date: Fri, 4 Sep 2009 16:25:35 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: References: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> Message-ID: <78c6bd860909041325k724bfc27jf689d071854e16de@mail.gmail.com> On Fri, Sep 4, 2009 at 1:27 PM, Ajai Khattri wrote: > On Fri, 4 Sep 2009, Michael B Allen wrote: > >> So I'm looking for opinions about ISPs that handle domain >> registration, domain management (basically DNS zone record updating) >> and some hosting (with PHP of course) and how to transfer those >> domains. I actually host my important stuff myself on a virtual >> private server so I am primarily interested in domain registration and >> management. The current ISP has very crude utilities for managing the >> domains, changing DNS and so on. It can be a chore just to login and >> operate their "control panel". > > Why does your *ISP* need to handle domain registration? Why not do it > yourself directly with a domain registrar? Many domain registrars offer > DNS too at no extra charge - that way you keep control of DNS and domains > and you can manage any migrations yourself. > >> Also, if I paid for a domain for say 10 years, do I have to pay full >> price all over again? > > If you are listed as the administrative contact on a domain, then you have > the authority to transfer that domain to another registrar. By "ISP" I mean the domain registrar and not Internet access. So AFAIK I'm already doing it directly. But I also need minimal hosting. I have one site that is just a static page with two images and another for a family member to learn PHP and web stuff. I would rather host these off of my VPS. I even paid an extra $50 for the PHP site. Someone recommend eNom but it is considerably more expensive. I suppose I got what I paid for. I don't understand why it should cost more than $10 / yr to host a few DNS records and maybe a static web page. Maybe the current "ISP" is trying to get rid of me and not answering support requests is their way of dropping customers that don't buy enough extra services. Mike -- Michael B Allen PHP Active Directory Integration http://www.ioplex.com/plexcel.html From vtbludgeon at gmail.com Fri Sep 4 16:56:56 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Fri, 4 Sep 2009 16:56:56 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <814i7o$44pt8k@dmzms99802.na.baesystems.com> References: <1252080494.12787@coral.he.net> <814i7o$44pt8k@dmzms99802.na.baesystems.com> Message-ID: <721f1cc50909041356i50661323nd5b2077d82780504@mail.gmail.com> On Fri, Sep 4, 2009 at 12:26 PM, Fee, Patrick J (US SSA) < patrick.fee at baesystems.com> wrote: > As a Lifetime Baseball fan (married over home plate back in 2000), > career-long web-programmer (I remember when NYPHP was first getting > started), and long time stalker of this list, I second Kristina's "Love It". > > As programmers, we spend a lot of time using metaphors to explain what we > are doing in a way easily understood by others. I've even explained the > ins-and-outs of MX records by using a "delivery to an upscale apartment > building" metaphor. But the baseball metaphor and Tao reference are best > I've seen in a while... both for their simplicity and universal (at least in > North America) appeal. > > Ah, not just in North America. Baseball is popular in Japan, Central America, the Carribean, etc etc because people like it, because it's *good*. One of those exports the US can feel proud of, unlike, e.g., McDonald's. As for Tao and all that, don't get me started, it's a favorite subject. My sig is excerpted from a poem that has several published translations, known where I come from as "The Identity of Relative and Absolute", by the 8th century Chinese Ch'an (Zen) Master Shitou. It's in the Zen tradition, but has a strong Taoist influence. You know the deal: Ordinary mind is Tao. Have a great weekend. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Fri Sep 4 17:17:40 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Fri, 04 Sep 2009 17:17:40 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <721f1cc50909041356i50661323nd5b2077d82780504@mail.gmail.com> References: <1252080494.12787@coral.he.net> <814i7o$44pt8k@dmzms99802.na.baesystems.com> <721f1cc50909041356i50661323nd5b2077d82780504@mail.gmail.com> Message-ID: <4AA183F4.5040207@devonianfarm.com> David Mintz wrote: > > > Ah, not just in North America. Baseball is popular in Japan, Central > America, the Carribean, etc etc because people like it, because it's > /good/. One of those exports the US can feel proud of, unlike, e.g., > McDonald's. > Well, last I heard the player's union was insisting that players should be allowed to take amphetamines during the game so they don't fall asleep. Maybe someday they'll provide amphetamines to the fans as well... From rolan at omnistep.com Fri Sep 4 17:22:25 2009 From: rolan at omnistep.com (Rolan Yang) Date: Fri, 04 Sep 2009 17:22:25 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> References: <78c6bd860909040903h53b8b833n26064d61896ee02e@mail.gmail.com> Message-ID: <4AA18511.1080602@omnistep.com> Michael B Allen wrote: > Hi All, > > I have a problem. I cannot get the ISP I registered my domains with to > reply to my support requests. Initially they did respond to my request > > 1and1.com has fairly cheap domain registration and basic DNS functionality. They keep your credit card on file so buying more domains is easy (not so good if your account is hacked though!) and the domains auto-renew every year so you don't have to worry about losing one to expiration. I don't use them for hosting, so i can't say anything about that. Their support through mail wasn't too helpful but their system just works, so there isn't much need for support. ~Rolan From ka at kacomputerconsulting.com Fri Sep 4 17:37:54 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Fri, 4 Sep 2009 14:37:54 -0700 Subject: [nycphp-talk] Need help understanding NULL Message-ID: <1252100274.26865@coral.he.net> > > > Well, last I heard the player's union was insisting that players > should be allowed to take amphetamines during the game so they don't > fall asleep. Maybe someday they'll provide amphetamines to the fans as > well... > Fans don't need amphetamines. Being a Mets fan, I can tell you it's so agitating watching their games ... almost as agitating as their management press conferences... that it should come with a warning "Limit Caffeine Use While Viewing This Product." And as for Yankees fans, half of them will need to be sedated and deprogrammed after they royally flame out in the playoffs again next month. As for the players, this time of year especially, I bet every game starts to feel like a day game after a night game, and we all know how that goes...I guess a few million bucks a year just isn't enough to keep them awake. Kristina From ajai at bitblit.net Fri Sep 4 20:18:51 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 4 Sep 2009 20:18:51 -0400 (EDT) Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: <78c6bd860909041325k724bfc27jf689d071854e16de@mail.gmail.com> Message-ID: On Fri, 4 Sep 2009, Michael B Allen wrote: > But I also need minimal hosting. I have one site that is just a static > page with two images and another for a family member to learn PHP and > web stuff. I would rather host these off of my VPS. I even paid an > extra $50 for the PHP site. > > Someone recommend eNom but it is considerably more expensive. I > suppose I got what I paid for. > > I don't understand why it should cost more than $10 / yr to host a few > DNS records and maybe a static web page. I use GoDaddy for that. > Maybe the current "ISP" is trying to get rid of me and not answering > support requests is their way of dropping customers that don't buy > enough extra services. I also run my own DNS for some domains on my own virtual server, Im paying $20/month for my own private server with Linode (linode.com). I use that for hosting some small sites, hosting email, and as a server to play around/develop code on. -- Aj. From ramons at gmx.net Fri Sep 4 20:52:35 2009 From: ramons at gmx.net (David Krings) Date: Fri, 04 Sep 2009 20:52:35 -0400 Subject: [nycphp-talk] Need help understanding NULL In-Reply-To: <721f1cc50909041356i50661323nd5b2077d82780504@mail.gmail.com> References: <1252080494.12787@coral.he.net> <814i7o$44pt8k@dmzms99802.na.baesystems.com> <721f1cc50909041356i50661323nd5b2077d82780504@mail.gmail.com> Message-ID: <4AA1B653.3080403@gmx.net> David Mintz wrote: > Ah, not just in North America. Baseball is popular in Japan, Central > America, the Carribean, etc etc because people like it, because it's > /good/. One of those exports the US can feel proud of, unlike, e.g., > McDonald's. > Well, maybe the overpaid, pillpopping, spitting players got their big bellies from McDonald's food? Being a foreign kid I find baseboll excruciatingly boring, but I guess that can be said about any event of the entertainment industry that borrows heavily from sports. Same with soccer in Germany, games are now played at noon just so that more pay TV channels in Asia will pay big bucks. That said, there are semi-professional baseball leagues in Germany. See the current standings for the first league here: http://www.baseball-softball.de/bundesliga/index.php?id=00000105 Nice to see that they have playdowns like a real sports league. Apparently, the Richrath Saints from my hometown are no longer playing. But we still got the Longhorns (http://www.langenfeld-longhorns.com/index.php?id=11) and the now independent Cheerleaders (http://www.cll-cheerleader.de/index.php) who are the new German Champions! Also, the DEL (German Icehockey League) started today and there are plenty of US players (see here: http://www.del.org/). But me being a soccer guy I rather stay with my favorite club (http://www.borussia.de/de/home,2,0.html), which signed Michael Bradley, son of the coach of the US men's national soccer team. Borussia M?nchengladbach was also the club where Kasey Keller played several seasons. OK, now what has that to do with a PHP mailing list? All these sites use PHP, which is probably an even more spectacular export than baseball. Happy PHPing, David From JoeyD473 at nyc.rr.com Fri Sep 4 23:07:47 2009 From: JoeyD473 at nyc.rr.com (Joey Derrico) Date: Fri, 04 Sep 2009 23:07:47 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: References: Message-ID: <4AA1D603.4080501@nyc.rr.com> I pretty much agree here. I have always used GoDaddy for Domains and I have never had a problem. I used Yahoo once for registering my domain many years ago, and it was just a pain in the butt. I have also used GoDaddy for hosting and have been happy with them and thought there prices were fair. Though admittedly I never looked around that much for Domain registration or Hosting. Joey Ajai Khattri wrote: > On Fri, 4 Sep 2009, Michael B Allen wrote: > > >> But I also need minimal hosting. I have one site that is just a static >> page with two images and another for a family member to learn PHP and >> web stuff. I would rather host these off of my VPS. I even paid an >> extra $50 for the PHP site. >> >> Someone recommend eNom but it is considerably more expensive. I >> suppose I got what I paid for. >> >> I don't understand why it should cost more than $10 / yr to host a few >> DNS records and maybe a static web page. >> > > I use GoDaddy for that. > > >> Maybe the current "ISP" is trying to get rid of me and not answering >> support requests is their way of dropping customers that don't buy >> enough extra services. >> > > I also run my own DNS for some domains on my own virtual server, Im > paying $20/month for my own private server with Linode (linode.com). I use > that for hosting some small sites, hosting email, and as a server to play > around/develop code on. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Sat Sep 5 07:56:33 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Sat, 5 Sep 2009 07:56:33 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: <4AA1D603.4080501@nyc.rr.com> References: <4AA1D603.4080501@nyc.rr.com> Message-ID: On Fri, Sep 4, 2009 at 11:07 PM, Joey Derrico wrote: > I pretty much agree here. I have always used GoDaddy for Domains and I have > never had a problem. I used Yahoo once for registering my domain many years > ago, and it was just a pain in the butt. I have also used GoDaddy for > hosting and have been happy with them and thought there prices were fair. > Though admittedly I never looked around that much for Domain registration or > Hosting. > > Joey > We've had problems with GoDaddy hosting recently. One client got email blacklisted because their hosted site shares the same IP address as a big spam operation (Columbia.edu wouldn't even deliver mail sent from other addresses with the organization's URL in it). Another client ended up on the Firefox/Google malware blacklist when their hosted site was compromised. Many other domains on the same box were compromised at the same time. Fast, cheap, secure. Choose two. Chris Snyder http://chxor.chxo.com/ From ben at projectskyline.com Sat Sep 5 09:00:50 2009 From: ben at projectskyline.com (Ben Sgro) Date: Sat, 05 Sep 2009 09:00:50 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: References: <4AA1D603.4080501@nyc.rr.com> Message-ID: <4AA26102.8010305@projectskyline.com> Hello, I have, and still use, nexcess.net for all my hosting and domains. I have a reseller plan w/them, so it is more than you want to pay, but their customer support is amazing and you might want to at least take a look. I've used goDaddy, but I had problems with addresses being blacklisted. I also didn't have much success with their customer support (nor did I expect to). I also used completeHostingSolutions for a few years, but they are ***** and nearly had to enter a legal battle to get my domain's released (along with various BBB complaints) - I'd advise against them. Good luck. - Ben Chris Snyder wrote: > On Fri, Sep 4, 2009 at 11:07 PM, Joey Derrico wrote: > >> I pretty much agree here. I have always used GoDaddy for Domains and I have >> never had a problem. I used Yahoo once for registering my domain many years >> ago, and it was just a pain in the butt. I have also used GoDaddy for >> hosting and have been happy with them and thought there prices were fair. >> Though admittedly I never looked around that much for Domain registration or >> Hosting. >> >> Joey >> >> > > We've had problems with GoDaddy hosting recently. > > One client got email blacklisted because their hosted site shares the > same IP address as a big spam operation (Columbia.edu wouldn't even > deliver mail sent from other addresses with the organization's URL in > it). > > Another client ended up on the Firefox/Google malware blacklist when > their hosted site was compromised. Many other domains on the same box > were compromised at the same time. > > Fast, cheap, secure. Choose two. > > Chris Snyder > http://chxor.chxo.com/ > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From edwardpotter at gmail.com Sat Sep 5 14:01:07 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Sat, 5 Sep 2009 14:01:07 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: <4AA26102.8010305@projectskyline.com> References: <4AA1D603.4080501@nyc.rr.com> <4AA26102.8010305@projectskyline.com> Message-ID: Make life VERY simple. It's not perfect, but it works: PICK the worlds biggest registrar of names, godaddy. use them. They will answer your calls on the spot 24 hours a day. Right from Phoenix, AZ. I have had zero problems with their tech support. They have been great to me. They have millions of sites registered with them. PICK the worlds biggest data center for hosting, hostgator. They will answer your online help in 30 seconds. I suspect outsourced tech help to China, but they know their stuff. Rock solid. These guys host hundreds of thousands of web sites. They know what they are doing. No worries, no problems. Life is short. Don't waste a minute with this sh*t. Just move on to coding, You should have ZERO problems with hosting (or almost) at this point. It's not 1995. Both of these guys are not perfect, but they are number 1. Dreamhost is ok, but I like LIVE support. Which hostgator has. On Sat, Sep 5, 2009 at 9:00 AM, Ben Sgro wrote: > Hello, > > I have, and still use, nexcess.net for all my hosting and domains. > > I have a reseller plan w/them, so it is more than you want to pay, but > their customer support is amazing and you might want to at least take > a look. > > I've used goDaddy, but I had problems with addresses being blacklisted. > I also didn't have much success with their customer support (nor did I > expect to). > > I also used completeHostingSolutions for a few years, but they are ***** > and > nearly had to enter a legal battle to get my domain's released (along with > various BBB complaints) - > I'd advise against them. > > Good luck. > > - Ben > > > Chris Snyder wrote: > >> On Fri, Sep 4, 2009 at 11:07 PM, Joey Derrico wrote: >> >> >>> I pretty much agree here. I have always used GoDaddy for Domains and I >>> have >>> never had a problem. I used Yahoo once for registering my domain many >>> years >>> ago, and it was just a pain in the butt. I have also used GoDaddy for >>> hosting and have been happy with them and thought there prices were fair. >>> Though admittedly I never looked around that much for Domain registration >>> or >>> Hosting. >>> >>> Joey >>> >>> >>> >> >> We've had problems with GoDaddy hosting recently. >> >> One client got email blacklisted because their hosted site shares the >> same IP address as a big spam operation (Columbia.edu wouldn't even >> deliver mail sent from other addresses with the organization's URL in >> it). >> >> Another client ended up on the Firefox/Google malware blacklist when >> their hosted site was compromised. Many other domains on the same box >> were compromised at the same time. >> >> Fast, cheap, secure. Choose two. >> >> Chris Snyder >> http://chxor.chxo.com/ >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> >> >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Sat Sep 5 21:34:55 2009 From: ioplex at gmail.com (Michael B Allen) Date: Sat, 5 Sep 2009 21:34:55 -0400 Subject: [nycphp-talk] Bad ISP Problem: Need New Domain Registration, Management and Hosting Service In-Reply-To: References: <78c6bd860909041325k724bfc27jf689d071854e16de@mail.gmail.com> Message-ID: <78c6bd860909051834q60d6136aqafdc1fbeaeb6fa7@mail.gmail.com> On Fri, Sep 4, 2009 at 8:18 PM, Ajai Khattri wrote: > On Fri, 4 Sep 2009, Michael B Allen wrote: > >> But I also need minimal hosting. I have one site that is just a static >> page with two images and another for a family member to learn PHP and >> web stuff. I would rather host these off of my VPS. I even paid an >> extra $50 for the PHP site. >> >> Someone recommend eNom but it is considerably more expensive. I >> suppose I got what I paid for. >> >> I don't understand why it should cost more than $10 / yr to host a few >> DNS records and maybe a static web page. > > I use GoDaddy for that. Turns out I'm already hosting a site with GoDaddy and didn't even realize it until I called them asking about their service. Duh. So I have initiated transfer of all of my domains to them. Incidentally, the now old ISP finally responded to my issue. But they had to convert my account in some goofy way to do it. That's probably what took them so long. And it still didn't really solve my issue. But that's not the worst of it. They sent me an email with my password in it totally in the clear. That should be against the law. It so happened to be close to a password I use for banking and such. I just spent the last hour changing passwords. Man will I be glad when the transfers to GoDaddy are complete. >> Maybe the current "ISP" is trying to get rid of me and not answering >> support requests is their way of dropping customers that don't buy >> enough extra services. > > I also run my own DNS for some domains on my own virtual server, Im > paying $20/month for my own private server with Linode (linode.com). I use > that for hosting some small sites, hosting email, and as a server to play > around/develop code on. I have used linode.com for many years. Great service. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From allen at TwoMiceAndAStrawberry.com Tue Sep 8 15:19:35 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Tue, 08 Sep 2009 14:19:35 -0500 Subject: [nycphp-talk] independent contractors and OSS Message-ID: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> Hi All, I'm looking for ideas on putting an "open source clause" into my development contracts. (Sure I'll talk it out with my attorney, but I want to come to him with something better than "please think about this and bill me for your ruminations.") All I want (ha!) is to get paid for my labor /and/ to have the option of then releasing that work under an Open Source license. Sure, it's not appropriate for many clients, but I think many of my existing clients wouldn't care. My main concern here is based on the notion that my typical development work is "work for hire" and thus IP developed in the course of that work belongs to the client, not to me. Anyway, I'm not fishing for a debate about licensing terms or contract law. I'm just wondering if anyone here does or has done jobs like this, and how you a) explain it to your clients verbally, and b) phrase it contractually. Anybody? - A. -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From chsnyder at gmail.com Tue Sep 8 16:01:08 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 8 Sep 2009 16:01:08 -0400 Subject: [nycphp-talk] independent contractors and OSS In-Reply-To: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> References: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> Message-ID: On Tue, Sep 8, 2009 at 3:19 PM, Allen Shaw wrote: > Anyway, I'm not fishing for a debate about licensing terms or contract law. > ?I'm just wondering if anyone here does or has done jobs like this, and how > you a) explain it to your clients verbally, and b) phrase it contractually. > Anybody? > > - A. When I freelanced I was always very up front about my desire to work with open source libraries and write open source code. Most clients didn't care, a few thought it was a neat idea. I once explained to someone that if they let me release the source code, they would get a 25% discount on the project. I might have padded my initial bid hoping this would happen. ;-) Later, I just made it clear that open source was how I worked. Simple, easy, and every project benefitted from the ones that came before. As for contract, just pick a license (BSD seems to raise fewer hackles than GPL, but again most non-programmers don't care) and say something like: Client will retain the copyright to all work for hire, but agrees to release the project source code under the license. I don't think you really want to be more specific than that in a contract. What does it mean to release? Where is it posted? Leave it alone so you can decide later. From ka at kacomputerconsulting.com Tue Sep 8 18:13:40 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Tue, 8 Sep 2009 15:13:40 -0700 Subject: [nycphp-talk] independent contractors and OSS Message-ID: <1252448020.14446@coral.he.net> Hi Allen, In my view there is a difference between code that contains specific proprietary information or trade secrets of your client (very rare) and code that is reusable, modular and somewhat generic in nature (99% of code) and is akin to a programmer's "Toolkit" and isn't property of anyone but the person who uses the tools. I think that in most cases if clients have specific concerns with confidentiality and code reuse, they will bring them up during negotiations. Otherwise, you should yourself be cognizant of (and discuss with your attorney) what is considered proprietary information in each context, if you have concerns. But most of your code will be considered "tools of the trade" and is fully reusable by you as such, in accordance with the GPL, at least according to my best understanding. Otherwise any restrictions on code reuse and publication aren't reasonable or enforceable on the part of the client...because good code gets reused, that's how things are done, and you should have the right to reuse your code unless it violates specific trade secrets...at least that's my viewpoint. I'd love to hear any specific legal advice on this topic. Kristina > Hi All, > > I'm looking for ideas on putting an "open source clause" into my > development contracts. (Sure I'll talk it out with my attorney, but I > want to come to him with something better than "please think about this > and bill me for your ruminations.") > > All I want (ha!) is to get paid for my labor /and/ to have the option of > then releasing that work under an Open Source license. Sure, it's not > appropriate for many clients, but I think many of my existing clients > wouldn't care. > > My main concern here is based on the notion that my typical development > work is "work for hire" and thus IP developed in the course of that work > belongs to the client, not to me. > > Anyway, I'm not fishing for a debate about licensing terms or contract > law. I'm just wondering if anyone here does or has done jobs like this, > and how you a) explain it to your clients verbally, and b) phrase it > contractually. > > Anybody? > > - A. > > -- > Allen Shaw > TwoMiceAndAStrawberry.com > > "Data Management, Web Applications, and the Meaning of Life" > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From michael.southwell at nyphp.com Wed Sep 9 09:48:50 2009 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 09 Sep 2009 09:48:50 -0400 Subject: [nycphp-talk] losing session with IE8 only Message-ID: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> I'm in an odd situation where I'm losing my session but only with IE8 and only with PHP 5.2.6, not with any other browsers and not on my dev server with 5.3.0. The controller script starts a session, sets a session variable, instantiates an object, and calls a method, about as simple as it can get. But the session variable is lost when the method runs. I can work around this by passing session vars around as parameters, but obviously that's a crappy solution. Any ideas? -- Michael Southwell Vice President, Education NYPHP TRAINING http://nyphp.com/Training From Ricky at nylontechnology.com Wed Sep 9 10:00:22 2009 From: Ricky at nylontechnology.com (Ricky Robinett) Date: Wed, 9 Sep 2009 10:00:22 -0400 Subject: [nycphp-talk] losing session with IE8 only In-Reply-To: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> References: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> Message-ID: <86F397D96FD09B4792600C76E082F5B6D4CC49@RODIMUS.nylontechnology.local> Michael, Are you experiencing this issue while running the code locally? I've seen this issue related to IE8 running in protected mode for local sites. There's a setting 'Enable Protected Mode' that needs to be unchecked. The only other time I've seen something similar is when running code on the rackspace cloud. Thanks! Ricky ..................................... Ricky Robinett Developer Zend Certified Engineer, PHP5 Adobe Certified Expert, Advanced ColdFusion 8 Nylon Technology 350 7th Avenue, 10th Floor New York, NY 10001 ? 212.691.1134 x25?direct 212.691.3477 fax ricky at nylontechnology.com www.nylontechnology.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michael Southwell Sent: Wednesday, September 09, 2009 9:49 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] losing session with IE8 only I'm in an odd situation where I'm losing my session but only with IE8 and only with PHP 5.2.6, not with any other browsers and not on my dev server with 5.3.0. The controller script starts a session, sets a session variable, instantiates an object, and calls a method, about as simple as it can get. But the session variable is lost when the method runs. I can work around this by passing session vars around as parameters, but obviously that's a crappy solution. Any ideas? -- Michael Southwell Vice President, Education NYPHP TRAINING http://nyphp.com/Training _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From cahoyos at us.ibm.com Wed Sep 9 10:09:51 2009 From: cahoyos at us.ibm.com (Carlos A Hoyos) Date: Wed, 9 Sep 2009 10:09:51 -0400 Subject: [nycphp-talk] losing session with IE8 only In-Reply-To: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> References: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> Message-ID: >I'm in an odd situation where I'm losing my session but only with IE8 >and only with PHP 5.2.6, not with any other browsers and not on my dev >server with 5.3.0. Although it sounds like a php / browser version problem, I'd start by trouble shooting with the domain and security settings in the browser. It's likely that your dev and production boxes are different and have different domains, IE8 might have your prod domain under not trusted sites, and might not be accepting cookies from it. Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: From allen at TwoMiceAndAStrawberry.com Wed Sep 9 10:37:42 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Wed, 09 Sep 2009 09:37:42 -0500 Subject: [nycphp-talk] independent contractors and OSS In-Reply-To: References: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> Message-ID: <4AA7BDB6.30606@TwoMiceAndAStrawberry.com> Chris Snyder wrote: > As for contract, just pick a license (BSD seems to raise fewer hackles > than GPL, but again most non-programmers don't care) and say something > like: Client will retain the copyright to all work for hire, but > agrees to release the project source code under the here> license. > Naming the license in the contract seems easy enough. Of course, if the (non-technical, consumer-minded) client holds the copyright, there is very little chance they'll be enforcing the terms of the license -- but even with that comment I'm approaching "IANAL" territory, so I'll stop here. Thanks for your input, Chris. Great to hear from someone who is actually doing this. - Allen -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From allen at TwoMiceAndAStrawberry.com Wed Sep 9 10:41:15 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Wed, 09 Sep 2009 09:41:15 -0500 Subject: [nycphp-talk] independent contractors and OSS In-Reply-To: <1252448020.14446@coral.he.net> References: <1252448020.14446@coral.he.net> Message-ID: <4AA7BE8B.7020305@TwoMiceAndAStrawberry.com> Kristina D. H. Anderson wrote: > In my view ... I suppose this is the kind of thing I'll have to work out with my attorney, as anyone should. My opinion on this matters only as far as it leads me to consult an attorney or not. Thanks for your input. - A. -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From chsnyder at gmail.com Wed Sep 9 11:19:04 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 9 Sep 2009 11:19:04 -0400 Subject: [nycphp-talk] independent contractors and OSS In-Reply-To: <4AA7BDB6.30606@TwoMiceAndAStrawberry.com> References: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> <4AA7BDB6.30606@TwoMiceAndAStrawberry.com> Message-ID: On Wed, Sep 9, 2009 at 10:37 AM, Allen Shaw wrote: > > Naming the license in the contract seems easy enough. ?Of course, if the > (non-technical, consumer-minded) client holds the copyright, there is very > little chance they'll be enforcing the terms of the license -- but even with > that comment I'm approaching ?"IANAL" territory, so I'll stop here. > I look at it from a practical angle: the reason why I want the code to be licensed as open is so that I can reuse anything useful that I write specifically for the client. I also believe it's the right thing to do for other reasons, but that's beside the point. They own the copyright, which makes them feel good. It "goes with the flow" legally by not trying to change the rules of work for hire. As far as I'm concerned, they can do whatever they want in the future, including going proprietary with future code. But at any point up to that change, I can legally and ethically incorporate functional parts of the project into my own toolkit by following the terms set forth in the license. Remember, if the client has property that is being worked into the project, such as trademarked artwork, licensed fonts, or third-party libraries, you have to be careful to keep those things separate from the open source codebase. This could mean keeping the project split between two repositories, but in my experience those external things are basically static and don't need to be versioned at all. Let us know what your lawyer thinks, Allen. From allen at TwoMiceAndAStrawberry.com Wed Sep 9 11:32:10 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Wed, 09 Sep 2009 10:32:10 -0500 Subject: [nycphp-talk] independent contractors and OSS In-Reply-To: References: <4AA6AE47.5060501@TwoMiceAndAStrawberry.com> <4AA7BDB6.30606@TwoMiceAndAStrawberry.com> Message-ID: <4AA7CA7A.6090306@TwoMiceAndAStrawberry.com> Chris Snyder wrote: > ... the reason why I want the code to > be licensed as open is so that I can reuse anything useful... > > They own the copyright, which makes them feel good. It "goes with the > flow" legally by not trying to change the rules of work for hire. > ... they can do whatever they want in the future, > including going proprietary with future code. > > ... I can legally and ethically > incorporate functional parts of the project into my own toolkit... > > ... if the client has property that is being worked into the > project, ... keep those things separate from > the open source codebase. > All very good points, Chris. This discussion helps a lot in sketching out something to review with my lawyer. It will be a couple of months before I do that -- I'm building a list of a few issues so I can make the best use of his billing increments. ;-) I'll (try to remember to) report back here with feedback after that consultation. Thanks, Allen -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From michael.southwell at nyphp.com Wed Sep 9 12:10:56 2009 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 09 Sep 2009 12:10:56 -0400 Subject: [nycphp-talk] losing session with IE8 only In-Reply-To: References: <20090909094850.k7p5rw7k3oc8884k@webmail.nyphp.com> Message-ID: <20090909121056.6vdkux5thc8oksw8@webmail.nyphp.com> Quoting Carlos A Hoyos : > Although it sounds like a php / browser version problem, I'd start by > trouble shooting with the domain and security settings in the browser. > It's likely that your dev and production boxes are different and have > different domains, IE8 might have your prod domain under not trusted sites, > and might not be accepting cookies from it. aha, I had the trusted set correctly, but not the cookies (I habitually have IE as crippled as possible). Many thanks, Carlos. -- Michael Southwell Vice President, Education NYPHP TRAINING http://nyphp.com/Training From paul at devonianfarm.com Thu Sep 10 15:19:28 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Thu, 10 Sep 2009 15:19:28 -0400 Subject: [nycphp-talk] Funny PHP Gotcha Message-ID: <4AA95140.2020102@devonianfarm.com> I ran into a gotcha today coding a PHP script... The funny thing about it is that I've been writing PHP for years and haven't run into this one before.. The pattern is function process_info() { foreach ($this->get_items() as $item) { // $data=array() <--- this should have been here, but wasn't $data["X"]=$item->Y; if ($item->bar) { $data["foo"]=$item->bar; } $this->do_something_with_transformed_data_array($data); } } I was mystified by the behavior of the script -- eventually it dawned on me that I wasn't initializing the $data array with each loop... I wanted $data["foo"] to be undefined if $item->bar evaluates false, however, the value of "foo" was persisting between iterations, causing do_something_with_transformed_data_array to behave horribly wrong... In some languages (C#, for instance), variables declared at a point in a loop come into existence at that point in the loop, and don't have any life from one iteration to the next -- that kind of scoping certainly makes this kind of error less likely (unless $data was defined in front of the loop.) What I find interesting is that I don't remember ever making this sort of mistake in the past... From tmpvar at gmail.com Thu Sep 10 15:22:23 2009 From: tmpvar at gmail.com (Elijah Insua) Date: Thu, 10 Sep 2009 15:22:23 -0400 Subject: [nycphp-talk] Funny PHP Gotcha In-Reply-To: <4AA95140.2020102@devonianfarm.com> References: <4AA95140.2020102@devonianfarm.com> Message-ID: <2b4feca10909101222k4d5ef660wc3c8a72659cad20@mail.gmail.com> > > What I find interesting is that I don't remember ever making this sort of > mistake in the past... > Coding with notices on would make that an easy catch. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Thu Sep 10 15:36:29 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Thu, 10 Sep 2009 15:36:29 -0400 Subject: [nycphp-talk] Funny PHP Gotcha In-Reply-To: <4AA95140.2020102@devonianfarm.com> References: <4AA95140.2020102@devonianfarm.com> Message-ID: On Thu, Sep 10, 2009 at 3:19 PM, Paul A Houle wrote: > ? What I find interesting is that I don't remember ever making this sort of > mistake in the past... ...that you know of. ;-) There is function scope in php, but not loop scope. From lists at nopersonal.info Thu Sep 10 15:52:39 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Thu, 10 Sep 2009 15:52:39 -0400 Subject: [nycphp-talk] naming identifiers In-Reply-To: References: <1251578829.5291@coral.he.net> <4A99D1C6.8020606@nopersonal.info> <20090830031616.GA10697@panix.com> <4A9A0BC2.4080504@nopersonal.info> Message-ID: <4AA95907.3040109@nopersonal.info> tedd wrote: > At 1:18 AM -0400 8/30/09, lists at nopersonal.info wrote: >> >> In MySQL the exp_date field data type is DATE. I strongly suspect that >> I'm handling my dates in the most verbose & confusing way possible, > > True, you're not handling the date thing correctly, but you're close. > > You need to understand how the date was entered into the database. > > Check out: > > http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date > > and review the DATE and NOW functions. Tedd, I just wanted to thank you again for calling my attention to the page above. Today I needed to create a drop down list that would filter the display of records based on a series of date ranges (expired, 1-30 days, 30-45 days, etc.) With the help of your link & my MySQL reference book--and after some trial & error with syntax--I was able to use the DATEDIFF and CURDATE functions in my queries to retrieve exactly the results I needed. Well, almost--I'm still trying to figure out how to get only items that are expired or have no expiration date set, but I have no doubt I'll eventually work it out. In any event, I can see that this method is wayyyyy better than whatever convoluted process I would have come up with had you not nudged me in the right direction. As soon as I figure that last bit out, I'm going to go back and see if I can also some of the functions to improve the other code that I initially posted. Even the smallest breakthrough feels like a huge victory to me, so... Woohoo! *happy dance* Bev :) From randalrust at gmail.com Fri Sep 11 14:37:27 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 11 Sep 2009 14:37:27 -0400 Subject: [nycphp-talk] Issues with server getting hacked Message-ID: We have suddenly started having issues with one of our servers with a local hosting company. We have never had any issues at all for the 6-7 years we've used their servers (we have a total of 5-6). Anyway, this one server went down last week, and tech support said: "Your VPS has been either hacked or an insecure script has been used to upload stuff. We have tar'ed up the data was being used (/tmp/b.tar.gz) You need to have your developer take a look at your sites code to determine any vulnerabilities" To which I responded, "ok, assume that we believe all of our scripts are secure. in looking at the logs, how do i pinpoint that someone is/was trying to upload something?" Tech support was less than helpful after that. So I pose the question to the list. How do I pinpoint the issue? There are about five domains running on the site, and we did not have any issues until we upgraded a ZenCart install for one of the sites. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From tim_lists at o2group.com Fri Sep 11 15:09:17 2009 From: tim_lists at o2group.com (Tim Lieberman) Date: Fri, 11 Sep 2009 15:09:17 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: <4C1C1758-5358-4F11-9E8B-5D5E6F1A9E19@o2group.com> I'd have a look at the owner and timestamps on the naughty files. Are they owned by the web server user? If so, check server logs in the period leading up to the file modification times. If they're owned by some other user, make sure that user account is secure. I've seen plenty of instances where someone thinks "it must be an insecure script", but it turned out that some user on the box had a bone-headed, easily brute-forced password. -Tim On Sep 11, 2009, at 2:37 PM, Randal Rust wrote: > We have suddenly started having issues with one of our servers with a > local hosting company. We have never had any issues at all for the 6-7 > years we've used their servers (we have a total of 5-6). Anyway, this > one server went down last week, and tech support said: > > "Your VPS has been either hacked or an insecure script has been used > to upload stuff. We have tar'ed up the data was being used > (/tmp/b.tar.gz) You need to have your developer take a look at your > sites code to determine any vulnerabilities" > > To which I responded, "ok, assume that we believe all of our scripts > are secure. in looking at the logs, how do i pinpoint that someone > is/was trying to upload something?" > > Tech support was less than helpful after that. So I pose the question > to the list. How do I pinpoint the issue? There are about five domains > running on the site, and we did not have any issues until we upgraded > a ZenCart install for one of the sites. > > -- > Randal Rust > R.Squared Communications > www.r2communications.com > 614-370-0036 > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From chsnyder at gmail.com Fri Sep 11 15:11:56 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 11 Sep 2009 15:11:56 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: On Fri, Sep 11, 2009 at 2:37 PM, Randal Rust wrote: > > "Your VPS has been either hacked or an insecure script has been used > to upload stuff. We have tar'ed up the data was being used > (/tmp/b.tar.gz) You need to have your developer take a look at your > sites code to determine any vulnerabilities" > > To which I responded, "ok, assume that we believe all of our scripts > are secure. in looking at the logs, how do i pinpoint that someone > is/was trying to upload something?" > > Tech support was less than helpful after that. So I pose the question > to the list. How do I pinpoint the issue? There are about five domains > running on the site, and we did not have any issues until we upgraded > a ZenCart install for one of the sites. They tar'd up the data from where? It might help you to know what directory it was uploaded to. Although a clever rootkit would cover its tracks, a clever kit wouldn't take down your server. But really, the problem could be anywhere in the system. Was the OS up to date? Latest version of PHP? Anything hand-compiled that hadn't been updated in a long time? Are there FTP accounts (unencrypted)? Anyone lazy about their passwords? There are a lot of ways for a box to get hacked. But as Tim just pointed out, it's usually something simple and obvious, like connecting to FTP from Starbucks or emailing a password from an internet cafe while on vacation. From randalrust at gmail.com Fri Sep 11 15:13:53 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 11 Sep 2009 15:13:53 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: <4C1C1758-5358-4F11-9E8B-5D5E6F1A9E19@o2group.com> References: <4C1C1758-5358-4F11-9E8B-5D5E6F1A9E19@o2group.com> Message-ID: On Fri, Sep 11, 2009 at 3:09 PM, Tim Lieberman wrote: > I'd have a look at the owner and timestamps on the naughty files. ?Are they > owned by the web server user? ?If so, check server logs in the period > leading up to the file modification times. Well the problem there is that they've all been removed from the server. And I deleted the local copy. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From randalrust at gmail.com Fri Sep 11 15:16:53 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 11 Sep 2009 15:16:53 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: On Fri, Sep 11, 2009 at 3:11 PM, Chris Snyder wrote: > They tar'd up the data from where? It might help you to know what > directory it was uploaded to. Yeah, they seem to be short on that detail, even though I posed the question. > But really, the problem could be anywhere in the system. I am fairly certain which domain it was. It's the one with an old version of CakePHP that we inherited. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From chsnyder at gmail.com Fri Sep 11 15:26:37 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 11 Sep 2009 15:26:37 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: On Fri, Sep 11, 2009 at 3:16 PM, Randal Rust wrote: > On Fri, Sep 11, 2009 at 3:11 PM, Chris Snyder wrote: > >> They tar'd up the data from where? It might help you to know what >> directory it was uploaded to. > > Yeah, they seem to be short on that detail, even though I posed the question. > >> But really, the problem could be anywhere in the system. > > I am fairly certain which domain it was. It's the one with an old > version of CakePHP that we inherited. > Heh. You mean the version you can't upgrade because it would break everything? Maybe it's time to see if you can put a Web Application Firewall in front of the box or install mod_security or something along those lines. The answer to your original question (pinpointing the upload) is to grep through the Apache logs for suspicious POSTs. Sounds like a lot of fun if you don't have any idea when it happened. From randalrust at gmail.com Fri Sep 11 15:29:38 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 11 Sep 2009 15:29:38 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: On Fri, Sep 11, 2009 at 3:26 PM, Chris Snyder wrote: >> old version of CakePHP that we inherited. > Heh. You mean the version you can't upgrade because it would break everything? Of course:) > Maybe it's time to see if you can put a Web Application Firewall in > front of the box or install mod_security or something along those > lines. Good thought. > The answer to your original question (pinpointing the upload) is to > grep through the Apache logs for suspicious POSTs. That's what I was thinking actually. There has to be something *somewhere* that would give me an indication of where the issue lies. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From ajai at bitblit.net Fri Sep 11 16:11:29 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 11 Sep 2009 16:11:29 -0400 (EDT) Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: Message-ID: On Fri, 11 Sep 2009, Randal Rust wrote: > That's what I was thinking actually. There has to be something > *somewhere* that would give me an indication of where the issue lies. Finding the source of a break-in like this can be notoriously difficult. Much better to wipe the drive and reinstall using the latest OS and software that can run your app (because you have no idea if any system binaries have been replaced with trojans). If the breakin is through an OS vulnerability then keeping it up to date will help. Obviously, if it happens again with a up-to-date OS, then its possible its a vulnerability in PHP and/or your application code (in which case looking at POST requests in logs might help). I once had an old server that had an IRC process running disguised as a regular Apache process. I only figured it out by observing open port numbers using netstat and finding the process with lsof. In the end I narrowed the problem down to an old component in a Joomla install that had a known vulnerability - updating that component fixed the problem. But servers are constantly fending off brute-force ssh attacks (denyhosts is your friend for that kind of crap). These days I switch off all unnecessary services and make sure needed services are not exposed to the outside (MySQL listening on localhost, Postfix too is its just used for sending out, etc). On many systems this might been running a firewall with a very locked down configuration (protocol tracking is also my friend). -- Aj. From oorza2k5 at gmail.com Fri Sep 11 16:20:38 2009 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Fri, 11 Sep 2009 16:20:38 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: <68de37340909111320h108393ecke93a8791d7e95465@mail.gmail.com> On Fri, Sep 11, 2009 at 4:11 PM, Ajai Khattri wrote: > On Fri, 11 Sep 2009, Randal Rust wrote: > >> That's what I was thinking actually. There has to be something >> *somewhere* that would give me an indication of where the issue lies. > > Finding the source of a break-in like this can be notoriously difficult. > Much better to wipe the drive and reinstall using the latest OS and > software that can run your app (because you have no idea if any system > binaries have been replaced with trojans). > > If the breakin is through an OS vulnerability then keeping it up to date > will help. Obviously, if it happens again with a up-to-date OS, then its > possible its a vulnerability in PHP and/or your application code (in which > case looking at POST requests in logs might help). > > I once had an old server that had an IRC process running disguised as a > regular Apache process. I only figured it out by observing open port > numbers using netstat and finding the process with lsof. In the end I > narrowed the problem down to an old component in a Joomla install that > had a known vulnerability - updating that component fixed the problem. > > But servers are constantly fending off brute-force ssh attacks (denyhosts > is your friend for that kind of crap). These days I switch off all > unnecessary services and make sure needed services are not exposed to the > outside (MySQL listening on localhost, Postfix too is its just used for > sending out, etc). On many systems this might been running a firewall > with a very locked down configuration (protocol tracking is also my > friend). > > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > Speaking of firewall lock down, I'm a big fan of the iptables configurations that deny access to ALL ports that aren't explicitly allowed, which for a vanilla web server would be 443/80 and 22 for ssh (and if you're crazy deny access to 22 save for an IP-based whitelist, I use a dyndns entry and re-resolve it every 15 minutes, so I can get in wherever, but I'm the only person to ever have ssh access to the server). I'd make sure password authentication is off for ssh as well and only use keyfile auth, as it's inherently more secure and less prone to attack. If you set your firewall up this way, you're pretty much guaranteed that an exploit is in your webapp, as webservers and openssh are very rarely open to exploits. From danielc at analysisandsolutions.com Fri Sep 11 17:24:39 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 11 Sep 2009 17:24:39 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: <20090911212439.GA21713@panix.com> Hey Randal: > "Your VPS has been either hacked or an insecure script has been used > to upload stuff. We have tar'ed up the data was being used > (/tmp/b.tar.gz) You need to have your developer take a look at your > sites code to determine any vulnerabilities" They must have some evidence indicating a problem exists. They need to tell you what that evidence is. Then you'll have a direction to go in. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From ajai at bitblit.net Fri Sep 11 17:40:16 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 11 Sep 2009 17:40:16 -0400 (EDT) Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: <68de37340909111320h108393ecke93a8791d7e95465@mail.gmail.com> Message-ID: On Fri, 11 Sep 2009, Eddie Drapkin wrote: > Speaking of firewall lock down, I'm a big fan of the iptables > configurations that deny access to ALL ports that aren't explicitly > allowed Yes, that's much like what I do these days. Not only what's coming in, but also strict iptable rules on what's allowed to open a connection *from* the host too. -- Aj. From ajai at bitblit.net Fri Sep 11 17:42:20 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 11 Sep 2009 17:42:20 -0400 (EDT) Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: <20090911212439.GA21713@panix.com> Message-ID: On Fri, 11 Sep 2009, Daniel Convissor wrote: > They must have some evidence indicating a problem exists. They need to > tell you what that evidence is. Then you'll have a direction to go in. That's not always the case: they could have seen something as simple as a sudden increase in load or number of connections coming in/out of the machine, or just a boatload of port 25 traffic. -- Aj. From dan.horning at planetnoc.com Sat Sep 12 07:30:20 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Sat, 12 Sep 2009 07:30:20 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: <000c01ca339c$69debc00$3d9c3400$@horning@planetnoc.com> One thing I haven't seen is too much help with finding tools that make problems like this scarce if not non-existant... I've been using an application called Atomic Secured Linux - it just works and the team behind it makes updates to the rules constantly but it's not just mod-sec rules - it also has some things to help you enforce good password policy http://tinyurl.com/asl-danhorning hope that also helps out some server admins. -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] On Behalf Of Randal Rust > Sent: Friday, September 11, 2009 2:37 PM > To: NYPHP Talk > Subject: [nycphp-talk] Issues with server getting hacked > > We have suddenly started having issues with one of our servers with a > local hosting company. We have never had any issues at all for the 6-7 > years we've used their servers (we have a total of 5-6). Anyway, this > one server went down last week, and tech support said: > > "Your VPS has been either hacked or an insecure script has been used > to upload stuff. We have tar'ed up the data was being used > (/tmp/b.tar.gz) You need to have your developer take a look at your > sites code to determine any vulnerabilities" > > To which I responded, "ok, assume that we believe all of our scripts > are secure. in looking at the logs, how do i pinpoint that someone > is/was trying to upload something?" > > Tech support was less than helpful after that. So I pose the question > to the list. How do I pinpoint the issue? There are about five domains > running on the site, and we did not have any issues until we upgraded > a ZenCart install for one of the sites. > > -- > Randal Rust > R.Squared Communications > www.r2communications.com > 614-370-0036 > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From matt at atopia.net Sat Sep 12 20:17:06 2009 From: matt at atopia.net (matt at atopia.net) Date: Sun, 13 Sep 2009 00:17:06 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> Does anyone have any good naming conventions for mysql databases and tables and columns? I'm developing a complex lamp project now, and my normal convention doesn't seem to want to work too well for this project - there are a few conflicts. From tim_lists at o2group.com Sat Sep 12 20:38:51 2009 From: tim_lists at o2group.com (Tim Lieberman) Date: Sat, 12 Sep 2009 20:38:51 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> Message-ID: <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> In my experience, the most important thing is consistency. Almost everything else is a matter of taste. For instance, some folks like to name columns with the table name as a prefix on every column (except foreign keys): create table a( a_id int, a_value varchar(64), a_created datetime ); create table b ( b_id int, a_id int references a.a_id b_value varchar(128), b_created datetime ); This is a smart thing to do as every column, across all tables, has a unique name (unless it's a foreign key) However, it can create a lot of typing, which can be annoying. On the other hand, you can be more concise: create table a( id int, value varchar(64) created datetime ); create table b( id int, value varchar(64), created datetime ); This saves some typing, but can create annoying ambiguity. Join operations end up requiring more specific selection critera (SELECT a.title as a_title, b.title as b_title). I used to use the former method almost exclusively. However, as I started playing with various frameworks, I've switched to the latter as those I've worked with kind of expect it. Probably because various _call() based magic ends up looking nicer in userland code. If you have more specific considerations, feel free to get more specific. -Tim On Sep 12, 2009, at 8:17 PM, matt at atopia.net wrote: > Does anyone have any good naming conventions for mysql databases and > tables and columns? I'm developing a complex lamp project now, and > my normal convention doesn't seem to want to work too well for this > project - there are a few conflicts. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From matt at atopia.net Sat Sep 12 21:09:35 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 21:09:35 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: > I used to use the former method almost exclusively. However, as I started > playing with various frameworks, I've switched to the latter as those I've > worked with kind of expect it. Probably because various _call() based magic > ends up looking nicer in userland code. > > If you have more specific considerations, feel free to get more specific. Hi Tim, Actually, you probably just covered about 99% of what I've read today, which is both a good and a bad thing - first, it's good because I know that information is out dated, but bad because I still have a few questions! But I'll try to clear my questions up. I've always used the second method you recommend. It works well for a schema like this: CREATE TABLE `country` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `state` ( `id` int(11) unsigned NOT NULL auto_increment, `county_id` int(11) unsigned NOT NULL, `name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `city` ( `id` int(11) unsigned NOT NULL auto_increment, `state_id` int(11) unsigned NOT NULL, `name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 each city has a state_id, and each state, has a country_id. And since cities, states, and countries all are sort of self explanatory, the schema sort of documents itself. But what if you're developing a billing system? That's where it's hard, because things are different: For instance: CREATE TABLE `account` ( `id` int(11) unsigned NOT NULL auto_increment, `type_id` int(11) unsigned NOT NULL, `companyName` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `account_type` ( `id` int(11) unsigned NOT NULL auto_increment, `type` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `customer` ( `id` int(11) unsigned NOT NULL auto_increment, `account_id` int(11) unsigned NOT NULL, `firstname` varchar(25) NOT NULL, `lastname` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 As you can see, each customer as an account_id. But each account also has type_id. I chose to do this like I did above, but why didn't I call the tables: customer customer_account customer_account_type After all, that would have worked the same way, right? So I never really know where to put the top level. Is it just up to the person? My guess is, does it just only matter if the table names aren't self explanatory? For instance, if I just had a table called "type", that isn't really verbose, which is why I put account_ in front of it. Also, as you can see, I only tend to use underscores when I'm referencing a column in another table. type_id for instance is account_type.id. Which is why I did "firstname" or "companyName" (I did this on purpose to show two possibilities). Which one is the better one to use? first_name/last_name/company_name or firstName, lastName, companyName? The problem is, if I use first_name, but I'm also using type_id, then some people might think that first_name references a column in the first (or a similarly named) table called "name". Thanks for your help! -Matt From tim_lists at o2group.com Sat Sep 12 21:37:19 2009 From: tim_lists at o2group.com (Tim Lieberman) Date: Sat, 12 Sep 2009 21:37:19 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> On Sep 12, 2009, at 9:09 PM, Matt Juszczak wrote: >> I used to use the former method almost exclusively. However, as I >> started playing with various frameworks, I've switched to the >> latter as those I've worked with kind of expect it. Probably >> because various _call() based magic ends up looking nicer in >> userland code. >> >> If you have more specific considerations, feel free to get more >> specific. > > Hi Tim, > > Actually, you probably just covered about 99% of what I've read > today, which is both a good and a bad thing - first, it's good > because I know that information is out dated, but bad because I > still have a few questions! But I'll try to clear my questions up. [snip] > > As you can see, each customer as an account_id. But each account > also has type_id. I chose to do this like I did above, but why > didn't I call the tables: > > customer > customer_account > customer_account_type > > After all, that would have worked the same way, right? So I never > really know where to put the top level. Is it just up to the > person? My guess is, does it just only matter if the table names > aren't self explanatory? For instance, if I just had a table called > "type", that isn't really verbose, which is why I put account_ in > front of it. For lookup tables like an "account type", I'd certainly call the table "account_type", and not just "type". Eventually you'll have an "order type" to deal with, so ... yeah. In the larger picture, you want to maintain enough specificity to keep things from getting confusing. This is largely a function of the domain. However, domains tend to grow, so it's better to err slightly on the side of verbose specificity. For example, it's probably not a terrible idea to use "customer_account" instead of just "account", in case 12 months from now you need two new kinds of ".+_account"s > Also, as you can see, I only tend to use underscores when I'm > referencing a column in another table. type_id for instance is > account_type.id. Which is why I did "firstname" or "companyName" (I > did this on purpose to show two possibilities). Which one is the > better one to use? first_name/last_name/company_name or firstName, > lastName, companyName? The problem is, if I use first_name, but I'm > also using type_id, then some people might think that first_name > references a column in the first (or a similarly named) table called > "name". For column names, it's tempting to give a specific meaning to an underscore, like you do. I tend to avoid that, as underscores can be really useful to keep things legible. lowerCamelCase, to me, is just kind of ugly in myslql and other rdbmses where identifiers are case-insensitive. If you really want, I suppose you could use a standard where a double underscore indicates some foreign key: account__id REFERENCES account.id From rsd at electronink.com Sat Sep 12 21:44:57 2009 From: rsd at electronink.com (Russ Demarest) Date: Sat, 12 Sep 2009 21:44:57 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> Message-ID: <57998CBB-1CF6-4A6D-A758-ACA3FBF0B376@electronink.com> Matt, This is how I originally learned it way back when and still believe. SQL should read almost like english. Tables are named in the plural. Columns are singular. id columns are the table name singular "_id". For example. create table users ( user_id int auto_increment not null, username varchar(20) ); I have used simple id columns which works fine too but using the table_id concept can make things easier down the road. Perhaps explaining what your current method is might make it easier for us to suggest a solution. Hope it Helps. On Sep 12, 2009, at 8:17 PM, matt at atopia.net wrote: > Does anyone have any good naming conventions for mysql databases and > tables and columns? I'm developing a complex lamp project now, and > my normal convention doesn't seem to want to work too well for this > project - there are a few conflicts. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From matt at atopia.net Sat Sep 12 21:45:00 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 21:45:00 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> Message-ID: > For lookup tables like an "account type", I'd certainly call the table > "account_type", and not just "type". Eventually you'll have an "order type" > to deal with, so ... yeah. > > In the larger picture, you want to maintain enough specificity to keep things > from getting confusing. This is largely a function of the domain. However, > domains tend to grow, so it's better to err slightly on the side of verbose > specificity. For example, it's probably not a terrible idea to use > "customer_account" instead of just "account", in case 12 months from now you > need two new kinds of ".+_account"s But account is the "top level". Every customer has an account. Every account has a type. So really, the top level is account type, because that's the only table out of the three that has no "parent" of it's own. But why would I create a customer and a customer_account table? Sure, each customer has one and only one account, so it makes sense, just like each account has one and only one type. But: account -> account type customer -> account aren't the same "sort of relationship" to me, even though they are both many to one relationships. Tying the account table to customer at this point (customer_account) would be bad, because every service in the "service" table has one and only one account as well - so why wouldn't we call it service_account and service? The same sort of thing. So at that point, I would probably do: account account_type customer service service_definition service_type invoice invoice_type but at that point, there really is no standard. I sort of just picked "meaningful" top level tables. Bah, it's all confusing to me :) I guess there really is no way to do it. If there are 10 levels of one:many relationships, you can't underscore them all out. one one_two one_two_three one_two_three_four would get quite confusing ;) > I tend to avoid that, as underscores can be really useful to keep things > legible. lowerCamelCase, to me, is just kind of ugly in myslql and other > rdbmses where identifiers are case-insensitive. > > If you really want, I suppose you could use a standard where a double > underscore indicates some foreign key: account__id REFERENCES account.id OK. So you would do something like: first_name account_id last_name service_definition_id Stuff like that? Even though first_name is just a field (and last_name), while account_id is the id column in the account table and service_definition_id is the id column in the service_definition table? And if you did the latter, would you do: service_definition__id at that point? or service__definition__id? Thanks! From rsd at electronink.com Sat Sep 12 21:55:10 2009 From: rsd at electronink.com (Russ Demarest) Date: Sat, 12 Sep 2009 21:55:10 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> Message-ID: <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> Matt, It is really hard to talk about tables without understanding the data needs. If you want to come up with an example of what you need to do we could all suggest structures. I don't really get the levels concept of a relational db, but what do I know :) Part of good db design is to plan way into the future. Your customers may only have one account now, but is it possible in the future they could have 2? These are HUGE decisions that can come back with really big teeth. What is a service? Russ On Sep 12, 2009, at 9:45 PM, Matt Juszczak wrote: >> For lookup tables like an "account type", I'd certainly call the >> table "account_type", and not just "type". Eventually you'll have >> an "order type" to deal with, so ... yeah. >> >> In the larger picture, you want to maintain enough specificity to >> keep things from getting confusing. This is largely a function of >> the domain. However, domains tend to grow, so it's better to err >> slightly on the side of verbose specificity. For example, it's >> probably not a terrible idea to use "customer_account" instead of >> just "account", in case 12 months from now you need two new kinds >> of ".+_account"s > > But account is the "top level". Every customer has an account. > Every account has a type. So really, the top level is account type, > because that's the only table out of the three that has no "parent" > of it's own. But why would I create a customer and a > customer_account table? Sure, each customer has one and only one > account, so it makes sense, just like each account has one and only > one type. But: > > account -> account type > customer -> account > > aren't the same "sort of relationship" to me, even though they are > both many to one relationships. Tying the account table to customer > at this point (customer_account) would be bad, because every service > in the "service" table has one and only one account as well - so why > wouldn't we call it service_account and service? The same sort of > thing. So at that point, I would probably do: > > account > account_type > customer > service > service_definition > service_type > invoice > invoice_type > > but at that point, there really is no standard. I sort of just > picked "meaningful" top level tables. > > Bah, it's all confusing to me :) I guess there really is no way to > do it. If there are 10 levels of one:many relationships, you can't > underscore them all out. > > one > one_two > one_two_three > one_two_three_four > > would get quite confusing ;) > > >> I tend to avoid that, as underscores can be really useful to keep >> things legible. lowerCamelCase, to me, is just kind of ugly in >> myslql and other rdbmses where identifiers are case-insensitive. >> >> If you really want, I suppose you could use a standard where a >> double underscore indicates some foreign key: account__id >> REFERENCES account.id > > OK. > > So you would do something like: > > first_name > account_id > last_name > service_definition_id > > Stuff like that? Even though first_name is just a field (and > last_name), while account_id is the id column in the account table > and service_definition_id is the id column in the service_definition > table? > > And if you did the latter, would you do: > > service_definition__id at that point? or service__definition__id? > > Thanks! > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From matt at atopia.net Sat Sep 12 22:02:10 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 22:02:10 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> Message-ID: > Part of good db design is to plan way into the future. Your customers > may only have one account now, but is it possible in the future they could > have 2? These are HUGE decisions that can come back with really big teeth. Well, this is all in an example. Even if a customer could have more than one accounts, allowing for a many:many, I'd still have the same issue figuring out naming schemes. > What is a service? "Email Hosting", "Web Hosting", etc. But I'm not designing a billing system. This is just an example. But I'd have these same questions if I was listing something else, like a forum, etc. From rsd at electronink.com Sat Sep 12 22:09:30 2009 From: rsd at electronink.com (Russ Demarest) Date: Sat, 12 Sep 2009 22:09:30 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> Message-ID: <8CD376C2-9D05-40E4-A52A-B6F6CBB02185@electronink.com> Well a customer to account would be a one to many. customers customer_id name .... accounts account_id name customer_id ... services service_id name ... account_services account_service_id account_id service_id start_date end_date ... So you have a one to many customers to accounts relation. You have a one to many accounts to account_services and a one to many services to account_services. Not sure if I am helping :/ Good luck On Sep 12, 2009, at 10:02 PM, Matt Juszczak wrote: >> Part of good db design is to plan way into the future. Your >> customers may only have one account now, but is it possible in the >> future they could have 2? These are HUGE decisions that can come >> back with really big teeth. > > Well, this is all in an example. Even if a customer could have more > than one accounts, allowing for a many:many, I'd still have the same > issue figuring out naming schemes. > >> What is a service? > > "Email Hosting", "Web Hosting", etc. But I'm not designing a > billing system. This is just an example. But I'd have these same > questions if I was listing something else, like a forum, etc. > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From tim_lists at o2group.com Sat Sep 12 22:19:06 2009 From: tim_lists at o2group.com (Tim Lieberman) Date: Sat, 12 Sep 2009 22:19:06 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> Message-ID: On Sep 12, 2009, at 9:45 PM, Matt Juszczak wrote: >> For lookup tables like an "account type", I'd certainly call the >> table "account_type", and not just "type". Eventually you'll have >> an "order type" to deal with, so ... yeah. >> >> In the larger picture, you want to maintain enough specificity to >> keep things from getting confusing. This is largely a function of >> the domain. However, domains tend to grow, so it's better to err >> slightly on the side of verbose specificity. For example, it's >> probably not a terrible idea to use "customer_account" instead of >> just "account", in case 12 months from now you need two new kinds >> of ".+_account"s > > But account is the "top level". Every customer has an account. > Every account has a type. So really, the top level is account type, > because that's the only table out of the three that has no "parent" > of it's own. But why would I create a customer and a > customer_account table? Sure, each customer has one and only one > account, so it makes sense, just like each account has one and only > one type. But: > > account -> account type > customer -> account > > aren't the same "sort of relationship" to me, even though they are > both many to one relationships. Tying the account table to customer > at this point (customer_account) would be bad, because every service > in the "service" table has one and only one account as well - so why > wouldn't we call it service_account and service? The same sort of > thing. So at that point, I would probably do: > > account > account_type > customer > service > service_definition > service_type > invoice > invoice_type > > but at that point, there really is no standard. I sort of just > picked "meaningful" top level tables. What's wrong with that? I think you've got it right -- it all comes down to the domain you're modeling. > > Bah, it's all confusing to me :) I guess there really is no way to > do it. If there are 10 levels of one:many relationships, you can't > underscore them all out. > > one > one_two > one_two_three > one_two_three_four > > would get quite confusing ;) True. I don't think a hard and fast rule is appropriate here. > >> I tend to avoid that, as underscores can be really useful to keep >> things legible. lowerCamelCase, to me, is just kind of ugly in >> myslql and other rdbmses where identifiers are case-insensitive. >> >> If you really want, I suppose you could use a standard where a >> double underscore indicates some foreign key: account__id >> REFERENCES account.id > > OK. > > So you would do something like: > > first_name > account_id > last_name > service_definition_id > That's pretty much what I'd actually do in practice. In every case I can think of, the trailing "_id" is enough to indicate that this is a foreign key. > Stuff like that? Even though first_name is just a field (and > last_name), while account_id is the id column in the account table > and service_definition_id is the id column in the service_definition > table? Right. Like I said, the underscore doesn't have any special semantic meaning, unless the following two characters are an "i" and then a "d" > And if you did the latter, would you do: > > service_definition__id at that point? or service__definition__id? Were I doing things that way, I'd do the former. But it's just a thought. I've never done things that way, and it seems confusing -- the visual difference between _ and __ is too small. -Tim From matt at atopia.net Sat Sep 12 22:27:39 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 22:27:39 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <8CD376C2-9D05-40E4-A52A-B6F6CBB02185@electronink.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> <8CD376C2-9D05-40E4-A52A-B6F6CBB02185@electronink.com> Message-ID: > account_services > account_service_id > account_id > service_id > start_date > end_date > ... > > So you have a one to many customers to accounts relation. You have a one to > many accounts to account_services and a one to many services to > account_services. Right, although there, I'd probably do it a different way, where services would be the listing of service and service_definition would be the definitions of services. That way, each record in "service" would have definition_id which would map to service_definition.id. From matt at atopia.net Sat Sep 12 22:29:00 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 22:29:00 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> Message-ID: > Right. Like I said, the underscore doesn't have any special semantic > meaning, unless the following two characters are an "i" and then a "d" Makes sense :) > But it's just a thought. I've never done things that way, and it seems > confusing -- the visual difference between _ and __ is too small. Agreed. OK, thanks! Turns out, I've sort of been doing things this way all along, minus the _ issue. Thanks for your input! From rsd at electronink.com Sat Sep 12 22:40:54 2009 From: rsd at electronink.com (Russ Demarest) Date: Sat, 12 Sep 2009 22:40:54 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> <39F2800A-10AE-4A25-AD28-BCFF0890B7CC@o2group.com> <1EE62707-ADA1-4C92-8FA3-8D2E8E916C9A@electronink.com> <8CD376C2-9D05-40E4-A52A-B6F6CBB02185@electronink.com> Message-ID: <33E86A02-5B24-4861-BFC2-5DC37F244738@electronink.com> I think the definition would be in the services table. The entity is a service, hosting or something. The columns in services should define the entity (serivce). So the service_id in account_services ties back to what the service is. On Sep 12, 2009, at 10:27 PM, Matt Juszczak wrote: >> account_services >> account_service_id >> account_id >> service_id >> start_date >> end_date >> ... >> >> So you have a one to many customers to accounts relation. You have >> a one to many accounts to account_services and a one to many >> services to account_services. > > Right, although there, I'd probably do it a different way, where > services would be the listing of service and service_definition > would be the definitions of services. That way, each record in > "service" would have definition_id which would map to > service_definition.id. > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From danielc at analysisandsolutions.com Sat Sep 12 23:12:47 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 12 Sep 2009 23:12:47 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> Message-ID: <20090913031247.GA9777@panix.com> Hi Matt: Here's my input on this same topic from a couple weeks ago on this list: http://lists.nyphp.org/pipermail/talk/2009-August/028910.html Good night, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From consult at covenantedesign.com Sat Sep 12 22:50:26 2009 From: consult at covenantedesign.com (CED) Date: Sat, 12 Sep 2009 22:50:26 -0400 Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: References: Message-ID: <4AAC5DF2.60209@covenantedesign.com> Ajai Khattri wrote: > On Fri, 11 Sep 2009, Daniel Convissor wrote: > > >> They must have some evidence indicating a problem exists. They need to >> tell you what that evidence is. Then you'll have a direction to go in. >> > > That's not always the case: they could have seen something as simple as a > sudden increase in load or number of connections coming in/out of the > machine, or just a boatload of port 25 traffic. > > > > If that was the case, they wouldn't have known which files to "tar up". Depending on how they were tar'd you should be able to see the path by querying the index of the tar file. Not to re-iterate what Chris was saying, but, you need information in order to take appropriate action. All things considered there are at least several thousand potential root causes to your issue, unless you have some direction and cooperation from the hosting provider. Attached is a basic template/list I rundown with clients (I do a lot of security on the side, and at work too. :P ) who experience similar issues, I have had these be well over 30 pages, as some clients really have no idea how many entities are touching their systems. I don't want it to appear overwhelming or impossible to successfully discover the root-cause of your particular incident; but unless you can get root-level log/AAA access, or some serious cooperation from the hosting company, you're likely not going to be able to cover all the bases. P.S. Don't pay for ASL, you can build it yourself, just do a little googlin' :o) -Ed "paranoid" Prevost -- 995 Maple Hill Road Castleton, New York 12033 518-331-5061 Consult at CovenanteDesign.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IR-WebApplication.xps Type: application/vnd.ms-xpsdocument Size: 611990 bytes Desc: not available URL: From matt at atopia.net Sat Sep 12 23:19:39 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 12 Sep 2009 23:19:39 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <20090913031247.GA9777@panix.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <20090913031247.GA9777@panix.com> Message-ID: > Here's my input on this same topic from a couple weeks ago on this list: > http://lists.nyphp.org/pipermail/talk/2009-August/028910.html I must have missed that. Sorry for the repost. So you would recommend using tablename_ in the beginning of every field in a table? From ajai at bitblit.net Sun Sep 13 00:23:31 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Sun, 13 Sep 2009 00:23:31 -0400 (EDT) Subject: [nycphp-talk] Issues with server getting hacked In-Reply-To: <4AAC5DF2.60209@covenantedesign.com> Message-ID: On Sat, 12 Sep 2009, CED wrote: > If that was the case, they wouldn't have known which files to "tar up". I assumed they tar'ed up the web application and logs. Hardly a rapier-like analysis... -- Aj. From ramons at gmx.net Sun Sep 13 07:51:31 2009 From: ramons at gmx.net (David Krings) Date: Sun, 13 Sep 2009 07:51:31 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: <4AACDCC3.90505@gmx.net> Tim Lieberman wrote: > In my experience, the most important thing is consistency. Almost > everything else is a matter of taste. Exactly! > However, it can create a lot of typing, which can be annoying. While that is a good warning, it shouldn't be a reason to shy away from clearly named tables and columns. I think it is better to type a bit more than keep guessing that column drvtsn is for driver_trip_sheet_number. Depending on which tool is used to craft the queries you may have intellisense and the typing is less of an issue after a while. Keep in mind that there is a chance that someone other than yourself has to deal with the tables and code later. And even you will be happier when you don't have to permanently guess half a year from now. I think it is better to deal with the annoyance of typing than with the annoyance of ambiguitiy. A mistyped column name will make your query fail, ambiguity will possibly not while being still wrong. Other than that, Tim covered it all. David From tedd at sperling.com Sun Sep 13 08:48:53 2009 From: tedd at sperling.com (tedd) Date: Sun, 13 Sep 2009 08:48:53 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674- @bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: At 9:09 PM -0400 9/12/09, Matt Juszczak wrote: >For instance: > >CREATE TABLE `account` ( >-snip- > >CREATE TABLE `account_type` ( >-snip- > >CREATE TABLE `customer` ( >-snip- > >As you can see, each customer as an account_id. But each account >also has type_id. I chose to do this like I did above, but why >didn't I call the tables: > >customer >customer_account >customer_account_type > >After all, that would have worked the same way, right? No. I see what you are saying, but "customer" is as different as "account" is to "account_type". They are all different things. Why confuse the matter by adding a customer prefix? There is no need. Plus, if you're going to be consistent with that "mistake", then your naming should be: customer_customer customer_account customer_account_type Do you see what I mean? That practice doesn't provide any clarity -- it only confuses things. One additional consideration, which was discussed last week, was not entitling the index of all tables as "id", but rather adding the table name to the id, such as: customer_id account_id account_type_id That makes sense to me because when you're dealing with a bunch of tables, a variable named "id" might be used incorrectly OR overwritten. For example, using: SELECT * FROM customer WHERE customer_id = '$customer_id' is just as easy to read as: SELECT * FROM customer WHERE id = '$id' But later in the code, after reading many different tables, what table does "$id" relate to? It's not clear is it? But there is no confusion with $customer_id is there? HTH's tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From matt at atopia.net Sun Sep 13 11:56:58 2009 From: matt at atopia.net (Matt Juszczak) Date: Sun, 13 Sep 2009 11:56:58 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674- @bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: > Plus, if you're going to be consistent with that "mistake", then your naming > should be: > > customer_customer > customer_account > customer_account_type I disagree. I wasn't trying to create "customer" as a prefix. I was simply renaming the tables based on the one:many relationships I have inside the tables. account account_type customer since customer stores an account_id, and account stores an account_type id, I could have picked customer to be the main level table, and just references out from there: customer.account_id -> account.id -> account.type_id -> account_type.id -> ..... ->... -> ...... -> ... Really inefficient, but it was another method of "standardizing" (which to me, gives no clarity, because as I've explained in one of my other emails, starting at one top level will make things confusing. And then what happens if some new table references customer.id as customer_id? like an emails table? Then I'm really confused: email email_customer email_customer_account email_customer_account_type I know this is messed up, but it was my thinking for a while as I tried to create a "Perfect" relational standard. And I had no many to many relationships at that point, so it was really easy to do, but very ineffective. > One additional consideration, which was discussed last week, was not > entitling the index of all tables as "id", but rather adding the table name > to the id, such as: > > customer_id > account_id > account_type_id > > That makes sense to me because when you're dealing with a bunch of tables, a > variable named "id" might be used incorrectly OR overwritten. This is what I've usually done in the past. > For example, using: > > SELECT * FROM customer WHERE customer_id = '$customer_id' > > is just as easy to read as: > > SELECT * FROM customer WHERE id = '$id' > > But later in the code, after reading many different tables, what table does > "$id" relate to? It's not clear is it? But there is no confusion with > $customer_id is there? > > HTH's Thanks for your input! -Matt From tedd at sperling.com Sun Sep 13 20:28:02 2009 From: tedd at sperling.com (tedd) Date: Sun, 13 Sep 2009 20:28:02 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674- @bda197.bisx.prod.on.blackberry> <3B4F27FE-7608-4CB4-AB24-35253F7EC085@o2group.com> Message-ID: At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: >>Plus, if you're going to be consistent with that "mistake", then >>your naming should be: >> >>customer_customer >>customer_account >>customer_account_type > >I disagree. I wasn't trying to create "customer" as a prefix. I >was simply renaming the tables based on the one:many relationships I >have inside the tables. > >account >account_type >customer > >since customer stores an account_id, and account stores an >account_type id, I could have picked customer to be the main level >table, and just references out from there: Mat: Main level table? I think that's one of the problems. There is no main level table -- there are just tables. It should not make any difference if you are addressing customers, accounts, account_types, emails, or whatever. They are nothing more than data and each has there own relationships. Also, I think I see another problem. The account table holds the account_type, right? If so, then your customer table should only contain the account_id, but NOT the account_type_id -- that's redundant. To access what account-type the customer has means you pull the account_id from the customer table -- then look up that account (using the account_id ) in the account table -- then pull the account_type_id and then find the account-type via it's id (account_type_id) from the account type table. Understand. customer: account_id account: account_type_id account_type: type In any event, that's the way I would do it. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ka at kacomputerconsulting.com Sun Sep 13 20:40:45 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 17:40:45 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252888845.27645@coral.he.net> You could have a table account_type which has primary key account_type_id, and a table account which has primary key account_id and then a lookup field in account which holds the relevant account_type_id... That way in table customer you just need a lookup field on account_id because there is already a relationship in place to find the type of account based on that value...I think that's what Tedd just said in essence as well. Although this structure is certainly presupposing that each customer has only one account. Kristina > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > >>Plus, if you're going to be consistent with that "mistake", then > >>your naming should be: > >> > >>customer_customer > >>customer_account > >>customer_account_type > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > >was simply renaming the tables based on the one:many relationships I > >have inside the tables. > > > >account > >account_type > >customer > > > >since customer stores an account_id, and account stores an > >account_type id, I could have picked customer to be the main level > >table, and just references out from there: > > Mat: > > Main level table? > > I think that's one of the problems. There is no main level table -- > there are just tables. It should not make any difference if you are > addressing customers, accounts, account_types, emails, or whatever. > They are nothing more than data and each has there own relationships. > > Also, I think I see another problem. The account table holds the > account_type, right? > > If so, then your customer table should only contain the account_id, > but NOT the account_type_id -- that's redundant. > > To access what account-type the customer has means you pull the > account_id from the customer table -- then look up that account > (using the account_id ) in the account table -- then pull the > account_type_id and then find the account-type via it's id > (account_type_id) from the account type table. Understand. > > customer: account_id > account: account_type_id > account_type: type > > In any event, that's the way I would do it. > > Cheers, > > tedd > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 21:28:42 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 01:28:42 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252888845.27645@coral.he.net> References: <1252888845.27645@coral.he.net> Message-ID: <1400656749-1252892098-cardhu_decombobulator_blackberry.rim.net-1775098127-@bda197.bisx.prod.on.blackberry> Right. I want to do it that way on purpose. Because where I tie the accounts together is by login id. But most of the time the customer information changes per account even if its the same person. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 17:40:45 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes You could have a table account_type which has primary key account_type_id, and a table account which has primary key account_id and then a lookup field in account which holds the relevant account_type_id... That way in table customer you just need a lookup field on account_id because there is already a relationship in place to find the type of account based on that value...I think that's what Tedd just said in essence as well. Although this structure is certainly presupposing that each customer has only one account. Kristina > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > >>Plus, if you're going to be consistent with that "mistake", then > >>your naming should be: > >> > >>customer_customer > >>customer_account > >>customer_account_type > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > >was simply renaming the tables based on the one:many relationships I > >have inside the tables. > > > >account > >account_type > >customer > > > >since customer stores an account_id, and account stores an > >account_type id, I could have picked customer to be the main level > >table, and just references out from there: > > Mat: > > Main level table? > > I think that's one of the problems. There is no main level table -- > there are just tables. It should not make any difference if you are > addressing customers, accounts, account_types, emails, or whatever. > They are nothing more than data and each has there own relationships. > > Also, I think I see another problem. The account table holds the > account_type, right? > > If so, then your customer table should only contain the account_id, > but NOT the account_type_id -- that's redundant. > > To access what account-type the customer has means you pull the > account_id from the customer table -- then look up that account > (using the account_id ) in the account table -- then pull the > account_type_id and then find the account-type via it's id > (account_type_id) from the account type table. Understand. > > customer: account_id > account: account_type_id > account_type: type > > In any event, that's the way I would do it. > > Cheers, > > tedd > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 21:46:25 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 18:46:25 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252892785.9329@coral.he.net> OK. Is login_id equivalent to customer_id, or is it generated anew upon each login and then associated with a customer profile? Does each customer have only 1 account? Kristina > Right. I want to do it that way on purpose. Because where I tie the accounts together is by login id. But most of the time the customer information changes per account even if its the same person. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 17:40:45 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > You could have a table account_type which has primary key > account_type_id, and a table account which has primary key account_id > and then a lookup field in account which holds the relevant > account_type_id... > > That way in table customer you just need a lookup field on account_id > because there is already a relationship in place to find the type of > account based on that value...I think that's what Tedd just said in > essence as well. > > Although this structure is certainly presupposing that each customer > has only one account. > > Kristina > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > >>Plus, if you're going to be consistent with that "mistake", then > > >>your naming should be: > > >> > > >>customer_customer > > >>customer_account > > >>customer_account_type > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > > >was simply renaming the tables based on the one:many relationships I > > >have inside the tables. > > > > > >account > > >account_type > > >customer > > > > > >since customer stores an account_id, and account stores an > > >account_type id, I could have picked customer to be the main level > > >table, and just references out from there: > > > > Mat: > > > > Main level table? > > > > I think that's one of the problems. There is no main level table -- > > there are just tables. It should not make any difference if you are > > addressing customers, accounts, account_types, emails, or whatever. > > They are nothing more than data and each has there own relationships. > > > > Also, I think I see another problem. The account table holds the > > account_type, right? > > > > If so, then your customer table should only contain the account_id, > > but NOT the account_type_id -- that's redundant. > > > > To access what account-type the customer has means you pull the > > account_id from the customer table -- then look up that account > > (using the account_id ) in the account table -- then pull the > > account_type_id and then find the account-type via it's id > > (account_type_id) from the account type table. Understand. > > > > customer: account_id > > account: account_type_id > > account_type: type > > > > In any event, that's the way I would do it. > > > > Cheers, > > > > tedd > > > > -- > > ------- > > http://sperling.com http://ancientstones.com http://earthstones.com > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:03:21 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:03:21 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252892785.9329@coral.he.net> References: <1252892785.9329@coral.he.net> Message-ID: <1273784048-1252893803-cardhu_decombobulator_blackberry.rim.net-1820595522-@bda197.bisx.prod.on.blackberry> Login ID is a field inside customer and can be set multiple times per customer record. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 18:46:25 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes OK. Is login_id equivalent to customer_id, or is it generated anew upon each login and then associated with a customer profile? Does each customer have only 1 account? Kristina > Right. I want to do it that way on purpose. Because where I tie the accounts together is by login id. But most of the time the customer information changes per account even if its the same person. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 17:40:45 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > You could have a table account_type which has primary key > account_type_id, and a table account which has primary key account_id > and then a lookup field in account which holds the relevant > account_type_id... > > That way in table customer you just need a lookup field on account_id > because there is already a relationship in place to find the type of > account based on that value...I think that's what Tedd just said in > essence as well. > > Although this structure is certainly presupposing that each customer > has only one account. > > Kristina > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > >>Plus, if you're going to be consistent with that "mistake", then > > >>your naming should be: > > >> > > >>customer_customer > > >>customer_account > > >>customer_account_type > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > > >was simply renaming the tables based on the one:many relationships I > > >have inside the tables. > > > > > >account > > >account_type > > >customer > > > > > >since customer stores an account_id, and account stores an > > >account_type id, I could have picked customer to be the main level > > >table, and just references out from there: > > > > Mat: > > > > Main level table? > > > > I think that's one of the problems. There is no main level table -- > > there are just tables. It should not make any difference if you are > > addressing customers, accounts, account_types, emails, or whatever. > > They are nothing more than data and each has there own relationships. > > > > Also, I think I see another problem. The account table holds the > > account_type, right? > > > > If so, then your customer table should only contain the account_id, > > but NOT the account_type_id -- that's redundant. > > > > To access what account-type the customer has means you pull the > > account_id from the customer table -- then look up that account > > (using the account_id ) in the account table -- then pull the > > account_type_id and then find the account-type via it's id > > (account_type_id) from the account type table. Understand. > > > > customer: account_id > > account: account_type_id > > account_type: type > > > > In any event, that's the way I would do it. > > > > Cheers, > > > > tedd > > > > -- > > ------- > > http://sperling.com http://ancientstones.com http://earthstones.com > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From matt at atopia.net Sun Sep 13 22:08:05 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:08:05 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1273784048-1252893803-cardhu_decombobulator_blackberry.rim.net-1820595522-@bda197.bisx.prod.on.blackberry> References: <1252892785.9329@coral.he.net><1273784048-1252893803-cardhu_decombobulator_blackberry.rim.net-1820595522-@bda197.bisx.prod.on.blackberry> Message-ID: <138793769-1252894085-cardhu_decombobulator_blackberry.rim.net-206219487-@bda197.bisx.prod.on.blackberry> Tedd, There are always top level tables in your schema, at least in my opinion. For instance, reference tables that do key -> value pairs tend to not be "root" level tables in a schema. Just my opinion. Also, I never said account_type would be stored inside the customer table. If you meant my reference to customer_account_type, that was just a naming scheme for a table only, which I was referring to as inefficient but would be a natural progression if I was to be obsessive about always documenting table relationships inside the table names. Based on the feedback I have gotten in this thread, the way I have done things in the past is okay, except ill now be adding underscores to column names for more than just foreign key identifiers. Thanks all! Matt -----Original Message----- From: matt at atopia.net Date: Mon, 14 Sep 2009 02:03:21 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes Login ID is a field inside customer and can be set multiple times per customer record. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 18:46:25 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes OK. Is login_id equivalent to customer_id, or is it generated anew upon each login and then associated with a customer profile? Does each customer have only 1 account? Kristina > Right. I want to do it that way on purpose. Because where I tie the accounts together is by login id. But most of the time the customer information changes per account even if its the same person. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 17:40:45 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > You could have a table account_type which has primary key > account_type_id, and a table account which has primary key account_id > and then a lookup field in account which holds the relevant > account_type_id... > > That way in table customer you just need a lookup field on account_id > because there is already a relationship in place to find the type of > account based on that value...I think that's what Tedd just said in > essence as well. > > Although this structure is certainly presupposing that each customer > has only one account. > > Kristina > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > >>Plus, if you're going to be consistent with that "mistake", then > > >>your naming should be: > > >> > > >>customer_customer > > >>customer_account > > >>customer_account_type > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > > >was simply renaming the tables based on the one:many relationships I > > >have inside the tables. > > > > > >account > > >account_type > > >customer > > > > > >since customer stores an account_id, and account stores an > > >account_type id, I could have picked customer to be the main level > > >table, and just references out from there: > > > > Mat: > > > > Main level table? > > > > I think that's one of the problems. There is no main level table -- > > there are just tables. It should not make any difference if you are > > addressing customers, accounts, account_types, emails, or whatever. > > They are nothing more than data and each has there own relationships. > > > > Also, I think I see another problem. The account table holds the > > account_type, right? > > > > If so, then your customer table should only contain the account_id, > > but NOT the account_type_id -- that's redundant. > > > > To access what account-type the customer has means you pull the > > account_id from the customer table -- then look up that account > > (using the account_id ) in the account table -- then pull the > > account_type_id and then find the account-type via it's id > > (account_type_id) from the account type table. Understand. > > > > customer: account_id > > account: account_type_id > > account_type: type > > > > In any event, that's the way I would do it. > > > > Cheers, > > > > tedd > > > > -- > > ------- > > http://sperling.com http://ancientstones.com http://earthstones.com > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 22:12:34 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 19:12:34 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252894354.14318@coral.he.net> If each customer can have more than 1 login ID, then normalization dictates a separate table, let's call it login , with fields login_id customer_id login_time login_IP session_id or whatever you store related to Logins, i.e. one row for each time the customer logs in, with their permanent customer_id and the assigned login_id for that session. Each time they login, the table generates a new row, with a new login_id, and associates it with their customer_id. So you can then do a query and find ALL the times each customer logged in. Unless you're overwriting the login_id in the customer table each time, and not storing the historical data...but usually that would not be the case. Kristina > Login ID is a field inside customer and can be set multiple times per customer record. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 18:46:25 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > OK. Is login_id equivalent to customer_id, or is it generated anew > upon each login and then associated with a customer profile? Does > each customer have only 1 account? > > Kristina > > > Right. I want to do it that way on purpose. Because where I tie the > accounts together is by login id. But most of the time the customer > information changes per account even if its the same person. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 17:40:45 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > You could have a table account_type which has primary key > > account_type_id, and a table account which has primary key account_id > > and then a lookup field in account which holds the relevant > > account_type_id... > > > > That way in table customer you just need a lookup field on account_id > > because there is already a relationship in place to find the type of > > account based on that value...I think that's what Tedd just said in > > essence as well. > > > > Although this structure is certainly presupposing that each customer > > has only one account. > > > > Kristina > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > >>Plus, if you're going to be consistent with that "mistake", then > > > >>your naming should be: > > > >> > > > >>customer_customer > > > >>customer_account > > > >>customer_account_type > > > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > > > >was simply renaming the tables based on the one:many relationships > I > > > >have inside the tables. > > > > > > > >account > > > >account_type > > > >customer > > > > > > > >since customer stores an account_id, and account stores an > > > >account_type id, I could have picked customer to be the main level > > > >table, and just references out from there: > > > > > > Mat: > > > > > > Main level table? > > > > > > I think that's one of the problems. There is no main level table - - > > > there are just tables. It should not make any difference if you are > > > addressing customers, accounts, account_types, emails, or whatever. > > > They are nothing more than data and each has there own > relationships. > > > > > > Also, I think I see another problem. The account table holds the > > > account_type, right? > > > > > > If so, then your customer table should only contain the account_id, > > > but NOT the account_type_id -- that's redundant. > > > > > > To access what account-type the customer has means you pull the > > > account_id from the customer table -- then look up that account > > > (using the account_id ) in the account table -- then pull the > > > account_type_id and then find the account-type via it's id > > > (account_type_id) from the account type table. Understand. > > > > > > customer: account_id > > > account: account_type_id > > > account_type: type > > > > > > In any event, that's the way I would do it. > > > > > > Cheers, > > > > > > tedd > > > > > > -- > > > ------- > > > http://sperling.com http://ancientstones.com > http://earthstones.com > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:17:40 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:17:40 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252894354.14318@coral.he.net> References: <1252894354.14318@coral.he.net> Message-ID: <2012147576-1252894661-cardhu_decombobulator_blackberry.rim.net-1621250510-@bda197.bisx.prod.on.blackberry> But that would also allow multiple logins for the same customer, which I don't. Its a one to many only. So it doesn't need a separate table. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 19:12:34 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes If each customer can have more than 1 login ID, then normalization dictates a separate table, let's call it login , with fields login_id customer_id login_time login_IP session_id or whatever you store related to Logins, i.e. one row for each time the customer logs in, with their permanent customer_id and the assigned login_id for that session. Each time they login, the table generates a new row, with a new login_id, and associates it with their customer_id. So you can then do a query and find ALL the times each customer logged in. Unless you're overwriting the login_id in the customer table each time, and not storing the historical data...but usually that would not be the case. Kristina > Login ID is a field inside customer and can be set multiple times per customer record. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 18:46:25 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > OK. Is login_id equivalent to customer_id, or is it generated anew > upon each login and then associated with a customer profile? Does > each customer have only 1 account? > > Kristina > > > Right. I want to do it that way on purpose. Because where I tie the > accounts together is by login id. But most of the time the customer > information changes per account even if its the same person. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 17:40:45 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > You could have a table account_type which has primary key > > account_type_id, and a table account which has primary key account_id > > and then a lookup field in account which holds the relevant > > account_type_id... > > > > That way in table customer you just need a lookup field on account_id > > because there is already a relationship in place to find the type of > > account based on that value...I think that's what Tedd just said in > > essence as well. > > > > Although this structure is certainly presupposing that each customer > > has only one account. > > > > Kristina > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > >>Plus, if you're going to be consistent with that "mistake", then > > > >>your naming should be: > > > >> > > > >>customer_customer > > > >>customer_account > > > >>customer_account_type > > > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. I > > > >was simply renaming the tables based on the one:many relationships > I > > > >have inside the tables. > > > > > > > >account > > > >account_type > > > >customer > > > > > > > >since customer stores an account_id, and account stores an > > > >account_type id, I could have picked customer to be the main level > > > >table, and just references out from there: > > > > > > Mat: > > > > > > Main level table? > > > > > > I think that's one of the problems. There is no main level table - - > > > there are just tables. It should not make any difference if you are > > > addressing customers, accounts, account_types, emails, or whatever. > > > They are nothing more than data and each has there own > relationships. > > > > > > Also, I think I see another problem. The account table holds the > > > account_type, right? > > > > > > If so, then your customer table should only contain the account_id, > > > but NOT the account_type_id -- that's redundant. > > > > > > To access what account-type the customer has means you pull the > > > account_id from the customer table -- then look up that account > > > (using the account_id ) in the account table -- then pull the > > > account_type_id and then find the account-type via it's id > > > (account_type_id) from the account type table. Understand. > > > > > > customer: account_id > > > account: account_type_id > > > account_type: type > > > > > > In any event, that's the way I would do it. > > > > > > Cheers, > > > > > > tedd > > > > > > -- > > > ------- > > > http://sperling.com http://ancientstones.com > http://earthstones.com > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 22:22:49 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 19:22:49 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252894969.16057@coral.he.net> I'm not clear on this... You just told me that you had multiple logins for each customer in the customer table. Right? I.e. each time they log in, they get a new login_id. > But that would also allow multiple logins for the same customer, which I don't. Its a one to many only. So it doesn't need a separate table. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:12:34 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > If each customer can have more than 1 login ID, then normalization > dictates a separate table, let's call it login , with fields > > login_id > customer_id > login_time > login_IP > session_id > > or whatever you store related to Logins, i.e. one row for each time the > customer logs in, with their permanent customer_id and the assigned > login_id for that session. > > Each time they login, the table generates a new row, with a new > login_id, and associates it with their customer_id. > > So you can then do a query and find ALL the times each customer logged > in. > > Unless you're overwriting the login_id in the customer table each time, > and not storing the historical data...but usually that would not be the > case. > > Kristina > > > > > Login ID is a field inside customer and can be set multiple times per > customer record. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 18:46:25 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > OK. Is login_id equivalent to customer_id, or is it generated anew > > upon each login and then associated with a customer profile? Does > > each customer have only 1 account? > > > > Kristina > > > > > Right. I want to do it that way on purpose. Because where I tie > the > > accounts together is by login id. But most of the time the customer > > information changes per account even if its the same person. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > You could have a table account_type which has primary key > > > account_type_id, and a table account which has primary key > account_id > > > and then a lookup field in account which holds the relevant > > > account_type_id... > > > > > > That way in table customer you just need a lookup field on > account_id > > > because there is already a relationship in place to find the type > of > > > account based on that value...I think that's what Tedd just said in > > > essence as well. > > > > > > Although this structure is certainly presupposing that each > customer > > > has only one account. > > > > > > Kristina > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > >>Plus, if you're going to be consistent with that "mistake", > then > > > > >>your naming should be: > > > > >> > > > > >>customer_customer > > > > >>customer_account > > > > >>customer_account_type > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. > I > > > > >was simply renaming the tables based on the one:many > relationships > > I > > > > >have inside the tables. > > > > > > > > > >account > > > > >account_type > > > > >customer > > > > > > > > > >since customer stores an account_id, and account stores an > > > > >account_type id, I could have picked customer to be the main > level > > > > >table, and just references out from there: > > > > > > > > Mat: > > > > > > > > Main level table? > > > > > > > > I think that's one of the problems. There is no main level table - > - > > > > there are just tables. It should not make any difference if you > are > > > > addressing customers, accounts, account_types, emails, or > whatever. > > > > They are nothing more than data and each has there own > > relationships. > > > > > > > > Also, I think I see another problem. The account table holds the > > > > account_type, right? > > > > > > > > If so, then your customer table should only contain the > account_id, > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > To access what account-type the customer has means you pull the > > > > account_id from the customer table -- then look up that account > > > > (using the account_id ) in the account table -- then pull the > > > > account_type_id and then find the account-type via it's id > > > > (account_type_id) from the account type table. Understand. > > > > > > > > customer: account_id > > > > account: account_type_id > > > > account_type: type > > > > > > > > In any event, that's the way I would do it. > > > > > > > > Cheers, > > > > > > > > tedd > > > > > > > > -- > > > > ------- > > > > http://sperling.com http://ancientstones.com > > http://earthstones.com > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:27:31 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:27:31 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252894969.16057@coral.he.net> References: <1252894969.16057@coral.he.net> Message-ID: <1001867708-1252895252-cardhu_decombobulator_blackberry.rim.net-291135730-@bda197.bisx.prod.on.blackberry> No. Not true. They can create a Login and map it to multiple customer records. However there can only be one account per customer. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 19:22:49 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes I'm not clear on this... You just told me that you had multiple logins for each customer in the customer table. Right? I.e. each time they log in, they get a new login_id. > But that would also allow multiple logins for the same customer, which I don't. Its a one to many only. So it doesn't need a separate table. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:12:34 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > If each customer can have more than 1 login ID, then normalization > dictates a separate table, let's call it login , with fields > > login_id > customer_id > login_time > login_IP > session_id > > or whatever you store related to Logins, i.e. one row for each time the > customer logs in, with their permanent customer_id and the assigned > login_id for that session. > > Each time they login, the table generates a new row, with a new > login_id, and associates it with their customer_id. > > So you can then do a query and find ALL the times each customer logged > in. > > Unless you're overwriting the login_id in the customer table each time, > and not storing the historical data...but usually that would not be the > case. > > Kristina > > > > > Login ID is a field inside customer and can be set multiple times per > customer record. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 18:46:25 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > OK. Is login_id equivalent to customer_id, or is it generated anew > > upon each login and then associated with a customer profile? Does > > each customer have only 1 account? > > > > Kristina > > > > > Right. I want to do it that way on purpose. Because where I tie > the > > accounts together is by login id. But most of the time the customer > > information changes per account even if its the same person. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > You could have a table account_type which has primary key > > > account_type_id, and a table account which has primary key > account_id > > > and then a lookup field in account which holds the relevant > > > account_type_id... > > > > > > That way in table customer you just need a lookup field on > account_id > > > because there is already a relationship in place to find the type > of > > > account based on that value...I think that's what Tedd just said in > > > essence as well. > > > > > > Although this structure is certainly presupposing that each > customer > > > has only one account. > > > > > > Kristina > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > >>Plus, if you're going to be consistent with that "mistake", > then > > > > >>your naming should be: > > > > >> > > > > >>customer_customer > > > > >>customer_account > > > > >>customer_account_type > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a prefix. > I > > > > >was simply renaming the tables based on the one:many > relationships > > I > > > > >have inside the tables. > > > > > > > > > >account > > > > >account_type > > > > >customer > > > > > > > > > >since customer stores an account_id, and account stores an > > > > >account_type id, I could have picked customer to be the main > level > > > > >table, and just references out from there: > > > > > > > > Mat: > > > > > > > > Main level table? > > > > > > > > I think that's one of the problems. There is no main level table - > - > > > > there are just tables. It should not make any difference if you > are > > > > addressing customers, accounts, account_types, emails, or > whatever. > > > > They are nothing more than data and each has there own > > relationships. > > > > > > > > Also, I think I see another problem. The account table holds the > > > > account_type, right? > > > > > > > > If so, then your customer table should only contain the > account_id, > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > To access what account-type the customer has means you pull the > > > > account_id from the customer table -- then look up that account > > > > (using the account_id ) in the account table -- then pull the > > > > account_type_id and then find the account-type via it's id > > > > (account_type_id) from the account type table. Understand. > > > > > > > > customer: account_id > > > > account: account_type_id > > > > account_type: type > > > > > > > > In any event, that's the way I would do it. > > > > > > > > Cheers, > > > > > > > > tedd > > > > > > > > -- > > > > ------- > > > > http://sperling.com http://ancientstones.com > > http://earthstones.com > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 22:34:18 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 19:34:18 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252895658.18510@coral.he.net> Hmm, OK. So therefore it is not the customer logging in, but some sort of account rep overseeing multiple customer accounts...? If that's true, the the customer_id and login_id have only a peripheral relationship, and there would also be an accountmanager_id or some such. Love this stuff. Kristina > No. Not true. They can create a Login and map it to multiple customer records. However there can only be one account per customer. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:22:49 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > I'm not clear on this... You just told me that you had multiple logins > for each customer in the customer table. Right? I.e. each time they > log in, they get a new login_id. > > > But that would also allow multiple logins for the same customer, > which I don't. Its a one to many only. So it doesn't need a separate > table. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:12:34 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > If each customer can have more than 1 login ID, then normalization > > dictates a separate table, let's call it login , with fields > > > > login_id > > customer_id > > login_time > > login_IP > > session_id > > > > or whatever you store related to Logins, i.e. one row for each time > the > > customer logs in, with their permanent customer_id and the assigned > > login_id for that session. > > > > Each time they login, the table generates a new row, with a new > > login_id, and associates it with their customer_id. > > > > So you can then do a query and find ALL the times each customer > logged > > in. > > > > Unless you're overwriting the login_id in the customer table each > time, > > and not storing the historical data...but usually that would not be > the > > case. > > > > Kristina > > > > > > > > > Login ID is a field inside customer and can be set multiple times > per > > customer record. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated anew > > > upon each login and then associated with a customer profile? Does > > > each customer have only 1 account? > > > > > > Kristina > > > > > > > Right. I want to do it that way on purpose. Because where I tie > > the > > > accounts together is by login id. But most of the time the customer > > > information changes per account even if its the same person. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > You could have a table account_type which has primary key > > > > account_type_id, and a table account which has primary key > > account_id > > > > and then a lookup field in account which holds the relevant > > > > account_type_id... > > > > > > > > That way in table customer you just need a lookup field on > > account_id > > > > because there is already a relationship in place to find the type > > of > > > > account based on that value...I think that's what Tedd just said > in > > > > essence as well. > > > > > > > > Although this structure is certainly presupposing that each > > customer > > > > has only one account. > > > > > > > > Kristina > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > >>Plus, if you're going to be consistent with that "mistake", > > then > > > > > >>your naming should be: > > > > > >> > > > > > >>customer_customer > > > > > >>customer_account > > > > > >>customer_account_type > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > prefix. > > I > > > > > >was simply renaming the tables based on the one:many > > relationships > > > I > > > > > >have inside the tables. > > > > > > > > > > > >account > > > > > >account_type > > > > > >customer > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > >account_type id, I could have picked customer to be the main > > level > > > > > >table, and just references out from there: > > > > > > > > > > Mat: > > > > > > > > > > Main level table? > > > > > > > > > > I think that's one of the problems. There is no main level > table - > > - > > > > > there are just tables. It should not make any difference if you > > are > > > > > addressing customers, accounts, account_types, emails, or > > whatever. > > > > > They are nothing more than data and each has there own > > > relationships. > > > > > > > > > > Also, I think I see another problem. The account table holds > the > > > > > account_type, right? > > > > > > > > > > If so, then your customer table should only contain the > > account_id, > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > To access what account-type the customer has means you pull the > > > > > account_id from the customer table -- then look up that account > > > > > (using the account_id ) in the account table -- then pull the > > > > > account_type_id and then find the account-type via it's id > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > customer: account_id > > > > > account: account_type_id > > > > > account_type: type > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > Cheers, > > > > > > > > > > tedd > > > > > > > > > > -- > > > > > ------- > > > > > http://sperling.com http://ancientstones.com > > > http://earthstones.com > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:37:07 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:37:07 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252895658.18510@coral.he.net> References: <1252895658.18510@coral.he.net> Message-ID: <1005570801-1252895829-cardhu_decombobulator_blackberry.rim.net-839410541-@bda197.bisx.prod.on.blackberry> No. It is the customer logging in, but a customer record can't have more than one account. I actually renamed the customer table to contact in my example to make it more clear. Yes, data can be repeated, but hardly ever. Matt -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 19:34:18 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes Hmm, OK. So therefore it is not the customer logging in, but some sort of account rep overseeing multiple customer accounts...? If that's true, the the customer_id and login_id have only a peripheral relationship, and there would also be an accountmanager_id or some such. Love this stuff. Kristina > No. Not true. They can create a Login and map it to multiple customer records. However there can only be one account per customer. > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:22:49 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > I'm not clear on this... You just told me that you had multiple logins > for each customer in the customer table. Right? I.e. each time they > log in, they get a new login_id. > > > But that would also allow multiple logins for the same customer, > which I don't. Its a one to many only. So it doesn't need a separate > table. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:12:34 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > If each customer can have more than 1 login ID, then normalization > > dictates a separate table, let's call it login , with fields > > > > login_id > > customer_id > > login_time > > login_IP > > session_id > > > > or whatever you store related to Logins, i.e. one row for each time > the > > customer logs in, with their permanent customer_id and the assigned > > login_id for that session. > > > > Each time they login, the table generates a new row, with a new > > login_id, and associates it with their customer_id. > > > > So you can then do a query and find ALL the times each customer > logged > > in. > > > > Unless you're overwriting the login_id in the customer table each > time, > > and not storing the historical data...but usually that would not be > the > > case. > > > > Kristina > > > > > > > > > Login ID is a field inside customer and can be set multiple times > per > > customer record. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated anew > > > upon each login and then associated with a customer profile? Does > > > each customer have only 1 account? > > > > > > Kristina > > > > > > > Right. I want to do it that way on purpose. Because where I tie > > the > > > accounts together is by login id. But most of the time the customer > > > information changes per account even if its the same person. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > You could have a table account_type which has primary key > > > > account_type_id, and a table account which has primary key > > account_id > > > > and then a lookup field in account which holds the relevant > > > > account_type_id... > > > > > > > > That way in table customer you just need a lookup field on > > account_id > > > > because there is already a relationship in place to find the type > > of > > > > account based on that value...I think that's what Tedd just said > in > > > > essence as well. > > > > > > > > Although this structure is certainly presupposing that each > > customer > > > > has only one account. > > > > > > > > Kristina > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > >>Plus, if you're going to be consistent with that "mistake", > > then > > > > > >>your naming should be: > > > > > >> > > > > > >>customer_customer > > > > > >>customer_account > > > > > >>customer_account_type > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > prefix. > > I > > > > > >was simply renaming the tables based on the one:many > > relationships > > > I > > > > > >have inside the tables. > > > > > > > > > > > >account > > > > > >account_type > > > > > >customer > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > >account_type id, I could have picked customer to be the main > > level > > > > > >table, and just references out from there: > > > > > > > > > > Mat: > > > > > > > > > > Main level table? > > > > > > > > > > I think that's one of the problems. There is no main level > table - > > - > > > > > there are just tables. It should not make any difference if you > > are > > > > > addressing customers, accounts, account_types, emails, or > > whatever. > > > > > They are nothing more than data and each has there own > > > relationships. > > > > > > > > > > Also, I think I see another problem. The account table holds > the > > > > > account_type, right? > > > > > > > > > > If so, then your customer table should only contain the > > account_id, > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > To access what account-type the customer has means you pull the > > > > > account_id from the customer table -- then look up that account > > > > > (using the account_id ) in the account table -- then pull the > > > > > account_type_id and then find the account-type via it's id > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > customer: account_id > > > > > account: account_type_id > > > > > account_type: type > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > Cheers, > > > > > > > > > > tedd > > > > > > > > > > -- > > > > > ------- > > > > > http://sperling.com http://ancientstones.com > > > http://earthstones.com > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 22:45:54 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 19:45:54 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252896354.21034@coral.he.net> If the customer is the one logging in, and the customer can have only one account, it's not theoretically possible for a login to be associated with more than one customer, then. So I'm back to my original suggestion for a login table. Each time the customer logs in, generate a row in that table. That way you can preserve the login history and you'd have to have that table, anyway, to generate the login_ids. > No. It is the customer logging in, but a customer record can't have more than one account. > > I actually renamed the customer table to contact in my example to make it more clear. Yes, data can be repeated, but hardly ever. > > Matt > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:34:18 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > Hmm, OK. So therefore it is not the customer logging in, but some sort > of account rep overseeing multiple customer accounts...? > If that's true, the the customer_id and login_id have only a peripheral > relationship, and there would also be an accountmanager_id or some such. > > Love this stuff. > > Kristina > > > No. Not true. They can create a Login and map it to multiple customer > records. However there can only be one account per customer. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:22:49 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > I'm not clear on this... You just told me that you had multiple > logins > > for each customer in the customer table. Right? I.e. each time they > > log in, they get a new login_id. > > > > > But that would also allow multiple logins for the same customer, > > which I don't. Its a one to many only. So it doesn't need a separate > > table. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 19:12:34 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > If each customer can have more than 1 login ID, then normalization > > > dictates a separate table, let's call it login , with fields > > > > > > login_id > > > customer_id > > > login_time > > > login_IP > > > session_id > > > > > > or whatever you store related to Logins, i.e. one row for each time > > the > > > customer logs in, with their permanent customer_id and the assigned > > > login_id for that session. > > > > > > Each time they login, the table generates a new row, with a new > > > login_id, and associates it with their customer_id. > > > > > > So you can then do a query and find ALL the times each customer > > logged > > > in. > > > > > > Unless you're overwriting the login_id in the customer table each > > time, > > > and not storing the historical data...but usually that would not be > > the > > > case. > > > > > > Kristina > > > > > > > > > > > > > Login ID is a field inside customer and can be set multiple times > > per > > > customer record. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated > anew > > > > upon each login and then associated with a customer profile? > Does > > > > each customer have only 1 account? > > > > > > > > Kristina > > > > > > > > > Right. I want to do it that way on purpose. Because where I > tie > > > the > > > > accounts together is by login id. But most of the time the > customer > > > > information changes per account even if its the same person. > > > > > > > > > > -----Original Message----- > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > > To: NYPHP Talk > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > schemes > > > > > > > > > > > > > > > You could have a table account_type which has primary key > > > > > account_type_id, and a table account which has primary key > > > account_id > > > > > and then a lookup field in account which holds the relevant > > > > > account_type_id... > > > > > > > > > > That way in table customer you just need a lookup field on > > > account_id > > > > > because there is already a relationship in place to find the > type > > > of > > > > > account based on that value...I think that's what Tedd just > said > > in > > > > > essence as well. > > > > > > > > > > Although this structure is certainly presupposing that each > > > customer > > > > > has only one account. > > > > > > > > > > Kristina > > > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > > >>Plus, if you're going to be consistent with that "mistake", > > > then > > > > > > >>your naming should be: > > > > > > >> > > > > > > >>customer_customer > > > > > > >>customer_account > > > > > > >>customer_account_type > > > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > > prefix. > > > I > > > > > > >was simply renaming the tables based on the one:many > > > relationships > > > > I > > > > > > >have inside the tables. > > > > > > > > > > > > > >account > > > > > > >account_type > > > > > > >customer > > > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > > >account_type id, I could have picked customer to be the main > > > level > > > > > > >table, and just references out from there: > > > > > > > > > > > > Mat: > > > > > > > > > > > > Main level table? > > > > > > > > > > > > I think that's one of the problems. There is no main level > > table - > > > - > > > > > > there are just tables. It should not make any difference if > you > > > are > > > > > > addressing customers, accounts, account_types, emails, or > > > whatever. > > > > > > They are nothing more than data and each has there own > > > > relationships. > > > > > > > > > > > > Also, I think I see another problem. The account table holds > > the > > > > > > account_type, right? > > > > > > > > > > > > If so, then your customer table should only contain the > > > account_id, > > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > > > To access what account-type the customer has means you pull > the > > > > > > account_id from the customer table -- then look up that > account > > > > > > (using the account_id ) in the account table -- then pull the > > > > > > account_type_id and then find the account-type via it's id > > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > > > customer: account_id > > > > > > account: account_type_id > > > > > > account_type: type > > > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > > > Cheers, > > > > > > > > > > > > tedd > > > > > > > > > > > > -- > > > > > > ------- > > > > > > http://sperling.com http://ancientstones.com > > > > http://earthstones.com > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:51:59 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:51:59 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252896354.21034@coral.he.net> References: <1252896354.21034@coral.he.net> Message-ID: <338340006-1252896721-cardhu_decombobulator_blackberry.rim.net-1439236139-@bda197.bisx.prod.on.blackberry> It is the contact (not customer, I renamed the table) logging in, but perhaps for two different entities. Here is an example. There is a guy named tom who has a personal webhosting account and a business account for his business. His email addresses are different. So are his names! For his personal account, he uses tom Jones. For his work account, he uses Thomas Jones II. So everything is different, but he is the same person and wants to maintain both accounts with the same username. -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 19:45:54 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes If the customer is the one logging in, and the customer can have only one account, it's not theoretically possible for a login to be associated with more than one customer, then. So I'm back to my original suggestion for a login table. Each time the customer logs in, generate a row in that table. That way you can preserve the login history and you'd have to have that table, anyway, to generate the login_ids. > No. It is the customer logging in, but a customer record can't have more than one account. > > I actually renamed the customer table to contact in my example to make it more clear. Yes, data can be repeated, but hardly ever. > > Matt > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:34:18 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > Hmm, OK. So therefore it is not the customer logging in, but some sort > of account rep overseeing multiple customer accounts...? > If that's true, the the customer_id and login_id have only a peripheral > relationship, and there would also be an accountmanager_id or some such. > > Love this stuff. > > Kristina > > > No. Not true. They can create a Login and map it to multiple customer > records. However there can only be one account per customer. > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:22:49 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > I'm not clear on this... You just told me that you had multiple > logins > > for each customer in the customer table. Right? I.e. each time they > > log in, they get a new login_id. > > > > > But that would also allow multiple logins for the same customer, > > which I don't. Its a one to many only. So it doesn't need a separate > > table. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 19:12:34 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > If each customer can have more than 1 login ID, then normalization > > > dictates a separate table, let's call it login , with fields > > > > > > login_id > > > customer_id > > > login_time > > > login_IP > > > session_id > > > > > > or whatever you store related to Logins, i.e. one row for each time > > the > > > customer logs in, with their permanent customer_id and the assigned > > > login_id for that session. > > > > > > Each time they login, the table generates a new row, with a new > > > login_id, and associates it with their customer_id. > > > > > > So you can then do a query and find ALL the times each customer > > logged > > > in. > > > > > > Unless you're overwriting the login_id in the customer table each > > time, > > > and not storing the historical data...but usually that would not be > > the > > > case. > > > > > > Kristina > > > > > > > > > > > > > Login ID is a field inside customer and can be set multiple times > > per > > > customer record. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated > anew > > > > upon each login and then associated with a customer profile? > Does > > > > each customer have only 1 account? > > > > > > > > Kristina > > > > > > > > > Right. I want to do it that way on purpose. Because where I > tie > > > the > > > > accounts together is by login id. But most of the time the > customer > > > > information changes per account even if its the same person. > > > > > > > > > > -----Original Message----- > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > > To: NYPHP Talk > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > schemes > > > > > > > > > > > > > > > You could have a table account_type which has primary key > > > > > account_type_id, and a table account which has primary key > > > account_id > > > > > and then a lookup field in account which holds the relevant > > > > > account_type_id... > > > > > > > > > > That way in table customer you just need a lookup field on > > > account_id > > > > > because there is already a relationship in place to find the > type > > > of > > > > > account based on that value...I think that's what Tedd just > said > > in > > > > > essence as well. > > > > > > > > > > Although this structure is certainly presupposing that each > > > customer > > > > > has only one account. > > > > > > > > > > Kristina > > > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > > >>Plus, if you're going to be consistent with that "mistake", > > > then > > > > > > >>your naming should be: > > > > > > >> > > > > > > >>customer_customer > > > > > > >>customer_account > > > > > > >>customer_account_type > > > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > > prefix. > > > I > > > > > > >was simply renaming the tables based on the one:many > > > relationships > > > > I > > > > > > >have inside the tables. > > > > > > > > > > > > > >account > > > > > > >account_type > > > > > > >customer > > > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > > >account_type id, I could have picked customer to be the main > > > level > > > > > > >table, and just references out from there: > > > > > > > > > > > > Mat: > > > > > > > > > > > > Main level table? > > > > > > > > > > > > I think that's one of the problems. There is no main level > > table - > > > - > > > > > > there are just tables. It should not make any difference if > you > > > are > > > > > > addressing customers, accounts, account_types, emails, or > > > whatever. > > > > > > They are nothing more than data and each has there own > > > > relationships. > > > > > > > > > > > > Also, I think I see another problem. The account table holds > > the > > > > > > account_type, right? > > > > > > > > > > > > If so, then your customer table should only contain the > > > account_id, > > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > > > To access what account-type the customer has means you pull > the > > > > > > account_id from the customer table -- then look up that > account > > > > > > (using the account_id ) in the account table -- then pull the > > > > > > account_type_id and then find the account-type via it's id > > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > > > customer: account_id > > > > > > account: account_type_id > > > > > > account_type: type > > > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > > > Cheers, > > > > > > > > > > > > tedd > > > > > > > > > > > > -- > > > > > > ------- > > > > > > http://sperling.com http://ancientstones.com > > > > http://earthstones.com > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Sun Sep 13 22:57:45 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Sun, 13 Sep 2009 19:57:45 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252897065.23932@coral.he.net> You stated previously that each customer/contact cannot have more than 1 account. But, it appears from the below that you need a "contact name" and then multiple "account names" under it(i.e. business name, personal account name) associated with the one contact/customer ID -- since they do in some cases have more than 1 account. So the contact logs on, that goes in the login table with the contact_id creating a new row, and then the contact_id jas a relationship with all existing accounts for that contact. But you'd still need to historically track the logons for each contact. Kristina > It is the contact (not customer, I renamed the table) logging in, but perhaps for two different entities. > > Here is an example. There is a guy named tom who has a personal webhosting account and a business account for his business. His email addresses are different. So are his names! For his personal account, he uses tom Jones. For his work account, he uses Thomas Jones II. So everything is different, but he is the same person and wants to maintain both accounts with the same username. > > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:45:54 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > If the customer is the one logging in, and the customer can have only > one account, it's not theoretically possible for a login to be > associated with more than one customer, then. > > So I'm back to my original suggestion for a login table. Each time the > customer logs in, generate a row in that table. That way you can > preserve the login history and you'd have to have that table, anyway, > to generate the login_ids. > > > No. It is the customer logging in, but a customer record can't have > more than one account. > > > > I actually renamed the customer table to contact in my example to > make it more clear. Yes, data can be repeated, but hardly ever. > > > > Matt > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:34:18 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > Hmm, OK. So therefore it is not the customer logging in, but some > sort > > of account rep overseeing multiple customer accounts...? > > If that's true, the the customer_id and login_id have only a > peripheral > > relationship, and there would also be an accountmanager_id or some > such. > > > > Love this stuff. > > > > Kristina > > > > > No. Not true. They can create a Login and map it to multiple > customer > > records. However there can only be one account per customer. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 19:22:49 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > I'm not clear on this... You just told me that you had multiple > > logins > > > for each customer in the customer table. Right? I.e. each time > they > > > log in, they get a new login_id. > > > > > > > But that would also allow multiple logins for the same customer, > > > which I don't. Its a one to many only. So it doesn't need a > separate > > > table. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 19:12:34 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > If each customer can have more than 1 login ID, then > normalization > > > > dictates a separate table, let's call it login , with fields > > > > > > > > login_id > > > > customer_id > > > > login_time > > > > login_IP > > > > session_id > > > > > > > > or whatever you store related to Logins, i.e. one row for each > time > > > the > > > > customer logs in, with their permanent customer_id and the > assigned > > > > login_id for that session. > > > > > > > > Each time they login, the table generates a new row, with a new > > > > login_id, and associates it with their customer_id. > > > > > > > > So you can then do a query and find ALL the times each customer > > > logged > > > > in. > > > > > > > > Unless you're overwriting the login_id in the customer table each > > > time, > > > > and not storing the historical data...but usually that would not > be > > > the > > > > case. > > > > > > > > Kristina > > > > > > > > > > > > > > > > > Login ID is a field inside customer and can be set multiple > times > > > per > > > > customer record. > > > > > > > > > > -----Original Message----- > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > > > To: NYPHP Talk > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > schemes > > > > > > > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated > > anew > > > > > upon each login and then associated with a customer profile? > > Does > > > > > each customer have only 1 account? > > > > > > > > > > Kristina > > > > > > > > > > > Right. I want to do it that way on purpose. Because where I > > tie > > > > the > > > > > accounts together is by login id. But most of the time the > > customer > > > > > information changes per account even if its the same person. > > > > > > > > > > > > -----Original Message----- > > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > > > To: NYPHP Talk > > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > > schemes > > > > > > > > > > > > > > > > > > You could have a table account_type which has primary key > > > > > > account_type_id, and a table account which has primary key > > > > account_id > > > > > > and then a lookup field in account which holds the relevant > > > > > > account_type_id... > > > > > > > > > > > > That way in table customer you just need a lookup field on > > > > account_id > > > > > > because there is already a relationship in place to find the > > type > > > > of > > > > > > account based on that value...I think that's what Tedd just > > said > > > in > > > > > > essence as well. > > > > > > > > > > > > Although this structure is certainly presupposing that each > > > > customer > > > > > > has only one account. > > > > > > > > > > > > Kristina > > > > > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > > > >>Plus, if you're going to be consistent with > that "mistake", > > > > then > > > > > > > >>your naming should be: > > > > > > > >> > > > > > > > >>customer_customer > > > > > > > >>customer_account > > > > > > > >>customer_account_type > > > > > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > > > prefix. > > > > I > > > > > > > >was simply renaming the tables based on the one:many > > > > relationships > > > > > I > > > > > > > >have inside the tables. > > > > > > > > > > > > > > > >account > > > > > > > >account_type > > > > > > > >customer > > > > > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > > > >account_type id, I could have picked customer to be the > main > > > > level > > > > > > > >table, and just references out from there: > > > > > > > > > > > > > > Mat: > > > > > > > > > > > > > > Main level table? > > > > > > > > > > > > > > I think that's one of the problems. There is no main level > > > table - > > > > - > > > > > > > there are just tables. It should not make any difference if > > you > > > > are > > > > > > > addressing customers, accounts, account_types, emails, or > > > > whatever. > > > > > > > They are nothing more than data and each has there own > > > > > relationships. > > > > > > > > > > > > > > Also, I think I see another problem. The account table > holds > > > the > > > > > > > account_type, right? > > > > > > > > > > > > > > If so, then your customer table should only contain the > > > > account_id, > > > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > > > > > To access what account-type the customer has means you pull > > the > > > > > > > account_id from the customer table -- then look up that > > account > > > > > > > (using the account_id ) in the account table -- then pull > the > > > > > > > account_type_id and then find the account-type via it's id > > > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > > > > > customer: account_id > > > > > > > account: account_type_id > > > > > > > account_type: type > > > > > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > tedd > > > > > > > > > > > > > > -- > > > > > > > ------- > > > > > > > http://sperling.com http://ancientstones.com > > > > > http://earthstones.com > > > > > > > _______________________________________________ > > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > From matt at atopia.net Sun Sep 13 22:59:49 2009 From: matt at atopia.net (matt at atopia.net) Date: Mon, 14 Sep 2009 02:59:49 +0000 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252897065.23932@coral.he.net> References: <1252897065.23932@coral.he.net> Message-ID: <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> We are on two separate pages. There is no tracking of login ID's. And nothing is automatically created. Login ID is a username. t1.login_id = t2.I'd -----Original Message----- From: "Kristina D. H. Anderson" Date: Sun, 13 Sep 2009 19:57:45 To: NYPHP Talk Subject: Re: [nycphp-talk] Database, table, and column naming schemes You stated previously that each customer/contact cannot have more than 1 account. But, it appears from the below that you need a "contact name" and then multiple "account names" under it(i.e. business name, personal account name) associated with the one contact/customer ID -- since they do in some cases have more than 1 account. So the contact logs on, that goes in the login table with the contact_id creating a new row, and then the contact_id jas a relationship with all existing accounts for that contact. But you'd still need to historically track the logons for each contact. Kristina > It is the contact (not customer, I renamed the table) logging in, but perhaps for two different entities. > > Here is an example. There is a guy named tom who has a personal webhosting account and a business account for his business. His email addresses are different. So are his names! For his personal account, he uses tom Jones. For his work account, he uses Thomas Jones II. So everything is different, but he is the same person and wants to maintain both accounts with the same username. > > > -----Original Message----- > From: "Kristina D. H. Anderson" > > Date: Sun, 13 Sep 2009 19:45:54 > To: NYPHP Talk > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > If the customer is the one logging in, and the customer can have only > one account, it's not theoretically possible for a login to be > associated with more than one customer, then. > > So I'm back to my original suggestion for a login table. Each time the > customer logs in, generate a row in that table. That way you can > preserve the login history and you'd have to have that table, anyway, > to generate the login_ids. > > > No. It is the customer logging in, but a customer record can't have > more than one account. > > > > I actually renamed the customer table to contact in my example to > make it more clear. Yes, data can be repeated, but hardly ever. > > > > Matt > > > > -----Original Message----- > > From: "Kristina D. H. Anderson" > > > > Date: Sun, 13 Sep 2009 19:34:18 > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > Hmm, OK. So therefore it is not the customer logging in, but some > sort > > of account rep overseeing multiple customer accounts...? > > If that's true, the the customer_id and login_id have only a > peripheral > > relationship, and there would also be an accountmanager_id or some > such. > > > > Love this stuff. > > > > Kristina > > > > > No. Not true. They can create a Login and map it to multiple > customer > > records. However there can only be one account per customer. > > > > > > -----Original Message----- > > > From: "Kristina D. H. Anderson" > > > > > > Date: Sun, 13 Sep 2009 19:22:49 > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] Database, table, and column naming schemes > > > > > > > > > I'm not clear on this... You just told me that you had multiple > > logins > > > for each customer in the customer table. Right? I.e. each time > they > > > log in, they get a new login_id. > > > > > > > But that would also allow multiple logins for the same customer, > > > which I don't. Its a one to many only. So it doesn't need a > separate > > > table. > > > > > > > > -----Original Message----- > > > > From: "Kristina D. H. Anderson" > > > > > > > > Date: Sun, 13 Sep 2009 19:12:34 > > > > To: NYPHP Talk > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > schemes > > > > > > > > > > > > If each customer can have more than 1 login ID, then > normalization > > > > dictates a separate table, let's call it login , with fields > > > > > > > > login_id > > > > customer_id > > > > login_time > > > > login_IP > > > > session_id > > > > > > > > or whatever you store related to Logins, i.e. one row for each > time > > > the > > > > customer logs in, with their permanent customer_id and the > assigned > > > > login_id for that session. > > > > > > > > Each time they login, the table generates a new row, with a new > > > > login_id, and associates it with their customer_id. > > > > > > > > So you can then do a query and find ALL the times each customer > > > logged > > > > in. > > > > > > > > Unless you're overwriting the login_id in the customer table each > > > time, > > > > and not storing the historical data...but usually that would not > be > > > the > > > > case. > > > > > > > > Kristina > > > > > > > > > > > > > > > > > Login ID is a field inside customer and can be set multiple > times > > > per > > > > customer record. > > > > > > > > > > -----Original Message----- > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > Date: Sun, 13 Sep 2009 18:46:25 > > > > > To: NYPHP Talk > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > schemes > > > > > > > > > > > > > > > OK. Is login_id equivalent to customer_id, or is it generated > > anew > > > > > upon each login and then associated with a customer profile? > > Does > > > > > each customer have only 1 account? > > > > > > > > > > Kristina > > > > > > > > > > > Right. I want to do it that way on purpose. Because where I > > tie > > > > the > > > > > accounts together is by login id. But most of the time the > > customer > > > > > information changes per account even if its the same person. > > > > > > > > > > > > -----Original Message----- > > > > > > From: "Kristina D. H. Anderson" > > > > > > > > > > > > Date: Sun, 13 Sep 2009 17:40:45 > > > > > > To: NYPHP Talk > > > > > > Subject: Re: [nycphp-talk] Database, table, and column naming > > > schemes > > > > > > > > > > > > > > > > > > You could have a table account_type which has primary key > > > > > > account_type_id, and a table account which has primary key > > > > account_id > > > > > > and then a lookup field in account which holds the relevant > > > > > > account_type_id... > > > > > > > > > > > > That way in table customer you just need a lookup field on > > > > account_id > > > > > > because there is already a relationship in place to find the > > type > > > > of > > > > > > account based on that value...I think that's what Tedd just > > said > > > in > > > > > > essence as well. > > > > > > > > > > > > Although this structure is certainly presupposing that each > > > > customer > > > > > > has only one account. > > > > > > > > > > > > Kristina > > > > > > > > > > > > > At 11:56 AM -0400 9/13/09, Matt Juszczak wrote: > > > > > > > >>Plus, if you're going to be consistent with > that "mistake", > > > > then > > > > > > > >>your naming should be: > > > > > > > >> > > > > > > > >>customer_customer > > > > > > > >>customer_account > > > > > > > >>customer_account_type > > > > > > > > > > > > > > > >I disagree. I wasn't trying to create "customer" as a > > > prefix. > > > > I > > > > > > > >was simply renaming the tables based on the one:many > > > > relationships > > > > > I > > > > > > > >have inside the tables. > > > > > > > > > > > > > > > >account > > > > > > > >account_type > > > > > > > >customer > > > > > > > > > > > > > > > >since customer stores an account_id, and account stores an > > > > > > > >account_type id, I could have picked customer to be the > main > > > > level > > > > > > > >table, and just references out from there: > > > > > > > > > > > > > > Mat: > > > > > > > > > > > > > > Main level table? > > > > > > > > > > > > > > I think that's one of the problems. There is no main level > > > table - > > > > - > > > > > > > there are just tables. It should not make any difference if > > you > > > > are > > > > > > > addressing customers, accounts, account_types, emails, or > > > > whatever. > > > > > > > They are nothing more than data and each has there own > > > > > relationships. > > > > > > > > > > > > > > Also, I think I see another problem. The account table > holds > > > the > > > > > > > account_type, right? > > > > > > > > > > > > > > If so, then your customer table should only contain the > > > > account_id, > > > > > > > but NOT the account_type_id -- that's redundant. > > > > > > > > > > > > > > To access what account-type the customer has means you pull > > the > > > > > > > account_id from the customer table -- then look up that > > account > > > > > > > (using the account_id ) in the account table -- then pull > the > > > > > > > account_type_id and then find the account-type via it's id > > > > > > > (account_type_id) from the account type table. Understand. > > > > > > > > > > > > > > customer: account_id > > > > > > > account: account_type_id > > > > > > > account_type: type > > > > > > > > > > > > > > In any event, that's the way I would do it. > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > tedd > > > > > > > > > > > > > > -- > > > > > > > ------- > > > > > > > http://sperling.com http://ancientstones.com > > > > > http://earthstones.com > > > > > > > _______________________________________________ > > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > _______________________________________________ > > > > > > New York PHP User Group Community Talk Mailing List > > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > > > > > New York PHP User Group Community Talk Mailing List > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > > > New York PHP User Group Community Talk Mailing List > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From lists at zaunere.com Mon Sep 14 08:50:53 2009 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Sep 2009 08:50:53 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <20090913031247.GA9777@panix.com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <20090913031247.GA9777@panix.com> Message-ID: <007301ca3539$feaa92c0$fbffb840$@com> > Here's my input on this same topic from a couple weeks ago on this > list: > http://lists.nyphp.org/pipermail/talk/2009-August/028910.html Wow, seems like we've got a new PHundamentals article already in the works :) H From allen at TwoMiceAndAStrawberry.com Mon Sep 14 10:11:42 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Mon, 14 Sep 2009 09:11:42 -0500 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> References: <1252897065.23932@coral.he.net> <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> Message-ID: <4AAE4F1E.8060400@TwoMiceAndAStrawberry.com> Hi Folks, This is an interesting thread, but hard to follow with all the top-posting. AFAIK it's not strictly prohibited on this list, but it does make it hard for others to follow the conversation. Thanks, Allen -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From matt at atopia.net Mon Sep 14 10:36:29 2009 From: matt at atopia.net (Matt Juszczak) Date: Mon, 14 Sep 2009 10:36:29 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <4AAE4F1E.8060400@TwoMiceAndAStrawberry.com> References: <1252897065.23932@coral.he.net> <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> <4AAE4F1E.8060400@TwoMiceAndAStrawberry.com> Message-ID: > This is an interesting thread, but hard to follow with all the top-posting. > AFAIK it's not strictly prohibited on this list, but it does make it hard for > others to follow the conversation. Yeah, my apologies. I usually dont top post, except all my replies yesterday were from my Blackberry. I forgot that the blackberry does top posting only. My apologies. From ka at kacomputerconsulting.com Mon Sep 14 10:43:29 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Mon, 14 Sep 2009 07:43:29 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252939409.1153@coral.he.net> > > This is an interesting thread, but hard to follow with all the top- posting. > > AFAIK it's not strictly prohibited on this list, but it does make it hard for > > others to follow the conversation. > > Yeah, my apologies. I usually dont top post, except all my replies > yesterday were from my Blackberry. I forgot that the blackberry does top > posting only. My apologies. > Someone needs to send me a whitepaper on acceptable vs. inacceptable posting. Is this the way you want me to do it, underneath everything else? Kristina From matt at atopia.net Mon Sep 14 10:44:58 2009 From: matt at atopia.net (Matt Juszczak) Date: Mon, 14 Sep 2009 10:44:58 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1252939409.1153@coral.he.net> References: <1252939409.1153@coral.he.net> Message-ID: > Someone needs to send me a whitepaper on acceptable vs. inacceptable > posting. Is this the way you want me to do it, underneath everything > else? This is usually the accepted way, yeah. http://en.wikipedia.org/wiki/Posting_style#Top.2C_bottom.2C_and_inline_replies From ka at kacomputerconsulting.com Mon Sep 14 10:47:17 2009 From: ka at kacomputerconsulting.com (Kristina D. H. Anderson) Date: Mon, 14 Sep 2009 07:47:17 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1252939637.2168@coral.he.net> > > Someone needs to send me a whitepaper on acceptable vs. inacceptable > > posting. Is this the way you want me to do it, underneath everything > > else? > > This is usually the accepted way, yeah. > > http://en.wikipedia.org/wiki/Posting_style#Top.2C_bottom.2C_and_inline_r eplies > Great. I'm now "drinking the Kool Aid". Kristina From lists at nopersonal.info Tue Sep 15 15:13:25 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Tue, 15 Sep 2009 15:13:25 -0400 Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <007301ca3539$feaa92c0$fbffb840$@com> References: <1605047040-1252801027-cardhu_decombobulator_blackberry.rim.net-392634674-@bda197.bisx.prod.on.blackberry> <20090913031247.GA9777@panix.com> <007301ca3539$feaa92c0$fbffb840$@com> Message-ID: <4AAFE755.5070408@nopersonal.info> Hans Zaunere wrote: >> Here's my input on this same topic from a couple weeks ago on this >> list: >> http://lists.nyphp.org/pipermail/talk/2009-August/028910.html > > Wow, seems like we've got a new PHundamentals article already in the works > :) No kidding! I'm just now catching up with the lists after spending the better part of last weekend wrestling with a bunch of tables in exactly this type of situation, so it's really fresh in my mind. Both Kristina's & Daniel's advice on field names in the previous thread made perfect sense once I got my tables properly normalized and needed to join data from columns in each of them in order to display a "master" (HTML) table of items. Bev From anoland at indigente.net Wed Sep 16 15:34:05 2009 From: anoland at indigente.net (Adrian Noland) Date: Wed, 16 Sep 2009 13:34:05 -0600 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <4A912A3D.2030005@reuel.net> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> Message-ID: <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> http://www.ibm.com/developerworks/opensource/top-projects/php.html http://www.ibm.com/developerworks/opensource/library/os-php-read/ On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: > > Anyone up for drafting a "Recommended Learning Program" for PHP? > > Thanks! > > Leam > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leam at reuel.net Fri Sep 18 05:16:27 2009 From: leam at reuel.net (Leam Hall) Date: Fri, 18 Sep 2009 05:16:27 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> Message-ID: <4AB34FEB.3000408@reuel.net> Awesome! Adrian Noland wrote: > http://www.ibm.com/developerworks/opensource/top-projects/php.html > http://www.ibm.com/developerworks/opensource/library/os-php-read/ > > On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: > >> Anyone up for drafting a "Recommended Learning Program" for PHP? >> >> Thanks! >> >> Leam From randalrust at gmail.com Fri Sep 18 15:23:16 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 18 Sep 2009 15:23:16 -0400 Subject: [nycphp-talk] Enabling PHP Extensions Message-ID: I have asked tech support at the hosting company to enable the php_zip extension for me. The person I am dealing with has told me that PHP has to be recompiled for this, because of what this page says: http://us2.php.net/manual/en/zip.installation.php Now I am by no means a server expert, but I enabled this same extension yesterday on our development box by simply un-commenting it in the php.ini file, stopping and restarting the server. Am I missing something here? -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From ajai at bitblit.net Fri Sep 18 15:35:56 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 18 Sep 2009 15:35:56 -0400 (EDT) Subject: [nycphp-talk] Enabling PHP Extensions In-Reply-To: Message-ID: On Fri, 18 Sep 2009, Randal Rust wrote: > I have asked tech support at the hosting company to enable the php_zip > extension for me. The person I am dealing with has told me that PHP > has to be recompiled for this, because of what this page says: > > http://us2.php.net/manual/en/zip.installation.php > > Now I am by no means a server expert, but I enabled this same > extension yesterday on our development box by simply un-commenting it > in the php.ini file, stopping and restarting the server. > > Am I missing something here? Means the PHP on your dev box has all extensions already compiled and installed so you can selectively add/remove them by simply editing your php.ini. -- Aj. From randalrust at gmail.com Fri Sep 18 15:46:09 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 18 Sep 2009 15:46:09 -0400 Subject: [nycphp-talk] Enabling PHP Extensions In-Reply-To: References: Message-ID: On Fri, Sep 18, 2009 at 3:35 PM, Ajai Khattri wrote: > Means the PHP on your dev box has all extensions already compiled and > installed so you can selectively add/remove them by simply editing your > php.ini. OK, that makes sense. However, I have had tech support enable extensions on this same server in the past and there has been no mention of needing to recompile. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From allen at TwoMiceAndAStrawberry.com Fri Sep 18 19:46:03 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Fri, 18 Sep 2009 18:46:03 -0500 Subject: [nycphp-talk] Enabling PHP Extensions In-Reply-To: References: Message-ID: <4AB41BBB.6070006@TwoMiceAndAStrawberry.com> Randal Rust wrote: > On Fri, Sep 18, 2009 at 3:35 PM, Ajai Khattri wrote: >> Means the PHP on your dev box has all extensions already compiled and >> installed so you can selectively add/remove them by simply editing your >> php.ini. >> > OK, that makes sense. However, I have had tech support enable > extensions on this same server in the past and there has been no > mention of needing to recompile. Would phpinfo() show what extensions that PHP binary was compiled with? -A. -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From oorza2k5 at gmail.com Fri Sep 18 20:13:41 2009 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Fri, 18 Sep 2009 20:13:41 -0400 Subject: [nycphp-talk] Enabling PHP Extensions In-Reply-To: <4AB41BBB.6070006@TwoMiceAndAStrawberry.com> References: <4AB41BBB.6070006@TwoMiceAndAStrawberry.com> Message-ID: <68de37340909181713t653f61aax79f3aa45267c6e2d@mail.gmail.com> On Fri, Sep 18, 2009 at 7:46 PM, Allen Shaw wrote: > Randal Rust wrote: >> >> On Fri, Sep 18, 2009 at 3:35 PM, Ajai Khattri wrote: >>> >>> Means the PHP on your dev box has all extensions already compiled and >>> installed so you can selectively add/remove them by simply editing your >>> php.ini. >>> >> >> OK, that makes sense. However, I have had tech support enable >> extensions on this same server in the past and there has been no >> mention of needing to recompile. > > Would phpinfo() show what extensions that PHP binary was compiled with? > > -A. > > -- > Allen Shaw > TwoMiceAndAStrawberry.com > > "Data Management, Web Applications, and the Meaning of Life" > The configure command (one of the first things phpinfo shows you :P) should give you all that information. From tim_lists at o2group.com Fri Sep 18 21:06:45 2009 From: tim_lists at o2group.com (Tim Lieberman) Date: Fri, 18 Sep 2009 21:06:45 -0400 Subject: [nycphp-talk] Enabling PHP Extensions In-Reply-To: References: Message-ID: <6F7325D7-AE02-4CF1-9CFD-6D3640273CCC@o2group.com> On Sep 18, 2009, at 3:46 PM, Randal Rust wrote: >> >> Means the PHP on your dev box has all extensions already compiled and >> installed so you can selectively add/remove them by simply editing >> your >> php.ini. > > OK, that makes sense. However, I have had tech support enable > extensions on this same server in the past and there has been no > mention of needing to recompile. If your still running php4, it seems like it does in fact need to be compiled in to php. However, assuming your host is running php >=5.2.0 they can install it as a shared library via pecl: # pecl install zip Just did this, and manually added extension=zip.so to my php.ini on my macbook pro. I'm running my own custom-compiled PHP (I like to build my AMP stacks from source) on this machine, but that shouldn't make a difference. -Tim From mutazmusa at gmail.com Fri Sep 18 21:57:57 2009 From: mutazmusa at gmail.com (Mutaz Musa) Date: Fri, 18 Sep 2009 21:57:57 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <4AB34FEB.3000408@reuel.net> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> <4AB34FEB.3000408@reuel.net> Message-ID: <602c8ac0909181857l4585c805nc426f8b3b7cc9aed@mail.gmail.com> > * glue frameworks - like Zend and Joomla 1.5 > Remember Joomla is a CMS not a framework. I've personally only ever used CodeIgniter and Cake. Both were fine though Cake was a bit stifling with the naming conventions. Documentation was good though and that made things easier. I'm going to try Zend for my next project because I like the idea of being able to use their classes on a needs-only basis. It seems more flexible and more enterprise ready. At least that's the vibe I get. On Fri, Sep 18, 2009 at 5:16 AM, Leam Hall wrote: > Awesome! > > > Adrian Noland wrote: > >> http://www.ibm.com/developerworks/opensource/top-projects/php.html >> http://www.ibm.com/developerworks/opensource/library/os-php-read/ >> >> On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: >> >> Anyone up for drafting a "Recommended Learning Program" for PHP? >>> >>> Thanks! >>> >>> Leam >>> >> _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Fri Sep 18 23:45:44 2009 From: davidalanroth at gmail.com (David Roth) Date: Fri, 18 Sep 2009 23:45:44 -0400 Subject: [nycphp-talk] Is this XML valid? Message-ID: I've been using simplexml to parse XML and so far the XML I've had to deal with has been pretty straight forward. Then I run across this XML which I don't know what to call it or how it should be handled properly. Here is a fragment of what I'm talking about: I was expecting each attribute and node to have it's own <> and , and the data not to be surround by double-quotes or am I missing something? Thanks! David From consult at covenantedesign.com Sat Sep 19 01:33:13 2009 From: consult at covenantedesign.com (CED) Date: Sat, 19 Sep 2009 01:33:13 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: References: Message-ID: <4AB46D19.3020705@covenantedesign.com> David Roth wrote: > I've been using simplexml to parse XML and so far the XML I've had to > deal with has been pretty straight forward. Then I run across this XML > which I don't know what to call it or how it should be handled properly. > > Here is a fragment of what I'm talking about: > > > > > > > > > I was expecting each attribute and node to have it's own <> and , > and the data not to be surround by double-quotes or am I missing > something? > > Thanks! > > David > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > > That's valid. it's just using short hand attributes instead of nested nodes. -- 995 Maple Hill Road Castleton, New York 12033 518-331-5061 Consult at CovenanteDesign.com From gatzby3jr at gmail.com Sat Sep 19 01:47:40 2009 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Sat, 19 Sep 2009 01:47:40 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: References: Message-ID: <29da5d150909182247r7220f11cg126b0d06041c6153@mail.gmail.com> I'm not an xml expert but I believe that's valid. Things within the brackets (and not in their own node I believe are considered attributes. On 9/18/09, David Roth wrote: > I've been using simplexml to parse XML and so far the XML I've had to > deal with has been pretty straight forward. Then I run across this XML > which I don't know what to call it or how it should be handled properly. > > Here is a fragment of what I'm talking about: > > > > > > > > > I was expecting each attribute and node to have it's own <> and , > and the data not to be surround by double-quotes or am I missing > something? > > Thanks! > > David > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- Sent from my mobile device Brian O'Connor From ramons at gmx.net Sat Sep 19 06:34:07 2009 From: ramons at gmx.net (David Krings) Date: Sat, 19 Sep 2009 06:34:07 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: References: Message-ID: <4AB4B39F.3020406@gmx.net> David Roth wrote: > I've been using simplexml to parse XML and so far the XML I've had to > deal with has been pretty straight forward. Then I run across this XML > which I don't know what to call it or how it should be handled properly. > > Here is a fragment of what I'm talking about: > > > > > > > > > I was expecting each attribute and node to have it's own <> and , and > the data not to be surround by double-quotes or am I missing something? > > Thanks! > > David I am not an XML expert, but yes, I would too expect opening and closing tags for everything, be it as or as . I don't see anything wrong with the quotes and think they have to be there. David From david at davidmintz.org Sat Sep 19 12:25:31 2009 From: david at davidmintz.org (David Mintz) Date: Sat, 19 Sep 2009 12:25:31 -0400 Subject: [nycphp-talk] does Dreamhost suck? Message-ID: <721f1cc50909190925m1205e214pd332a9937d6a7b78@mail.gmail.com> I have been using Dreamhost because it's cheap and provides what I need and has a really weird and funny newsletter. However, if you need a custom php.ini, the instructions are found at http://www.wiki.dreamhost.com/index.php/PHP.ini with a great big disclamer to the effect that if it suddenly breaks, you're on your own. Sure enough, my little php app suddenly broke. Tore my hair out for a while, then finally worked around. Is the ability to customize your php.ini asking too much of a low-end shared-hosting provider? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at nopersonal.info Sat Sep 19 12:42:29 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Sat, 19 Sep 2009 12:42:29 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: References: Message-ID: <4AB509F5.70408@nopersonal.info> David Roth wrote: > > > > > > > > I was expecting each attribute and node to have it's own <> and , and > the data not to be surround by double-quotes or am I missing something? XML attributes must be quoted, but you can use either double or single quotes. If there's nothing between the opening & closing tags you can use the shorthand tag, just as you would with or
. http://www.tizag.com/xmlTutorial/xmltag.php http://www.tizag.com/xmlTutorial/xmlattributes.php Bev From matt at atopia.net Sat Sep 19 12:43:58 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 19 Sep 2009 12:43:58 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> References: <1252897065.23932@coral.he.net> <1998818657-1252897190-cardhu_decombobulator_blackberry.rim.net-2106618346-@bda197.bisx.prod.on.blackberry> Message-ID: Kristina, While we're on this subject, I thought I would ask another pending question I have related to this. I need to store a bunch (and by a bunch, I mean about 30-40) binary true/false values in my database. In the past, I would do something like this: CREATE TABLE........... ( is_active tinyint(1) default 1, is_friend tinyint(1) default 1, is_something tinyint(1) default 1, is_something_else tinyint(1) default 1, ...... ); But that table would really get large if I had 30-40 extra columns in it. The other option was that I was considering a bit string: CREATE TABLE......... ( permissions mediumint(11) default 0 ); INSERT INTO permissions (permissions) values (7); Since there are 3 bits that make up the integer "8" (or 0 - 7): 1,2,4 This would mean that I could store 3 combinations of permissions, but it would be an integer. This could get even more complex if I had 30-40, as I could do a really large hex string, or just store the actual bit string: aef214 <--- one value 11000110111011 <-- or something like that Thoughts? -Matt From alexchan.1976 at gmail.com Sat Sep 19 14:01:37 2009 From: alexchan.1976 at gmail.com (Alex C) Date: Sat, 19 Sep 2009 14:01:37 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: <4AB509F5.70408@nopersonal.info> References: <4AB509F5.70408@nopersonal.info> Message-ID: <8f494f760909191101j7514cd24j2707bebb75b066bc@mail.gmail.com> HI, Have you tried closing tag ? it seems not to be closed. Alex On Sat, Sep 19, 2009 at 12:42 PM, lists at nopersonal.info wrote: > David Roth wrote: > >> >> >> >> >> >> >> >> I was expecting each attribute and node to have it's own <> and , and >> the data not to be surround by double-quotes or am I missing something? > > XML attributes must be quoted, but you can use either double or single > quotes. If there's nothing between the opening & closing tags you can > use the shorthand tag, just as you would with or >
. > > http://www.tizag.com/xmlTutorial/xmltag.php > http://www.tizag.com/xmlTutorial/xmlattributes.php > > Bev > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From michael.southwell at nyphp.com Sat Sep 19 14:09:34 2009 From: michael.southwell at nyphp.com (Michael Southwell) Date: Sat, 19 Sep 2009 14:09:34 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <721f1cc50909190925m1205e214pd332a9937d6a7b78@mail.gmail.com> References: <721f1cc50909190925m1205e214pd332a9937d6a7b78@mail.gmail.com> Message-ID: <4AB51E5E.3080508@nyphp.com> David Mintz wrote: > I have been using Dreamhost because it's cheap and provides what I need > and has a really weird and funny newsletter. with the emphasis on weird ;-) > > However, if you need a custom php.ini, the instructions are found at > http://www.wiki.dreamhost.com/index.php/PHP.ini with a great big > disclamer to the effect that if it suddenly breaks, you're on your own. > Sure enough, my little php app suddenly broke. Tore my hair out for a > while, then finally worked around. I have had the exact same experience. When you say "worked around," do you mean that you couldn't solve the problem? What happened to me was that they changed something which meant that the default path to mail was no longer good, so I couldn't send mail; but when I finally figured that out, I fixed it by setting the path and the issue was over. > > Is the ability to customize your php.ini asking too much of a low-end > shared-hosting provider? uhh, but in fact they did provide that for you (and me), no? They just don't provide any support for it. -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From davidalanroth at gmail.com Sat Sep 19 14:53:52 2009 From: davidalanroth at gmail.com (David Roth) Date: Sat, 19 Sep 2009 14:53:52 -0400 Subject: [nycphp-talk] Is this XML valid? Message-ID: <59E89A80-51EA-4150-9B62-C06A708BB57F@gmail.com> > David Roth wrote: > > > > > > > > > > > > > > > > > I was expecting each attribute and node to have it's own <> and >, and > > the data not to be surround by double-quotes or am I missing > something? > > XML attributes must be quoted, but you can use either double or single > quotes. If there's nothing between the opening & closing tags you can > use the shorthand tag, just as you would with or >
. > > http://www.tizag.com/xmlTutorial/xmltag.php > http://www.tizag.com/xmlTutorial/xmlattributes.php > > Bev So if the above is valid XML, is there a specific name for this approach? Is there a benefit for doing it this way instead of nested nodes? Might this be considered older method? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattwilliamsnyc at gmail.com Sat Sep 19 15:05:39 2009 From: mattwilliamsnyc at gmail.com (Matt Williams) Date: Sat, 19 Sep 2009 15:05:39 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: <59E89A80-51EA-4150-9B62-C06A708BB57F@gmail.com> References: <59E89A80-51EA-4150-9B62-C06A708BB57F@gmail.com> Message-ID: <9a0c4fc50909191205r721b417ew88a847a0b2782bff@mail.gmail.com> On Fri, Sep 18, 2009 at 23:45, David Roth wrote: I've been using simplexml to parse XML and so far the XML I've had to deal > with has been pretty straight forward. Then I run across this XML which I > don't know what to call it or how it should be handled properly. There are different ways to access elements and attributes of XML documents with SimpleXML (XPath, etc), but generally speaking, attributes can be accessed as associative array values. Here's an example: XML; $sxml = new SimpleXMLElement($xml); // Access the first package $package = $sxml->packages->package[0]; echo sprintf( "Package Dimensions: %sx%sx%s Weight: %s\n", $package['length'], $package['width'], $package['height'], $package['weight'] ); // Find all packages foreach($sxml->packages->package as $package) { echo sprintf( "Package Dimensions: %sx%sx%s Weight: %s\n", $package['length'], $package['width'], $package['height'], $package['weight'] ); } On Sat, Sep 19, 2009 at 14:53, David Roth wrote: So if the above is valid XML, is there a specific name for this approach? Is there a benefit for doing it this way instead of nested nodes? Might this be considered older method? > > No, it's not an older method. There is no absolute definition of when to use elements versus attributes. There are, however, some attempts at defining general principles: http://www.ibm.com/developerworks/xml/library/x-eleatt.html Also, -------------- next part -------------- An HTML attachment was scrubbed... URL: From ka at kacomputerconsulting.com Sat Sep 19 15:51:58 2009 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sat, 19 Sep 2009 12:51:58 -0700 Subject: [nycphp-talk] Database, table, and column naming schemes Message-ID: <1253389918.29423@coral.he.net> > Kristina, > > While we're on this subject, I thought I would ask another pending > question I have related to this. > > I need to store a bunch (and by a bunch, I mean about 30-40) binary > true/false values in my database. > > In the past, I would do something like this: > > CREATE TABLE........... ( > is_active tinyint(1) default 1, > is_friend tinyint(1) default 1, > is_something tinyint(1) default 1, > is_something_else tinyint(1) default 1, > ...... > ); > > But that table would really get large if I had 30-40 extra columns in it. > The other option was that I was considering a bit string: > > > CREATE TABLE......... ( > permissions mediumint(11) default 0 > ); > > INSERT INTO permissions (permissions) values (7); > > Since there are 3 bits that make up the integer "8" (or 0 - 7): > > 1,2,4 > > This would mean that I could store 3 combinations of permissions, but it > would be an integer. > > This could get even more complex if I had 30-40, as I could do a really > large hex string, or just store the actual bit string: > > > aef214 <--- one value > 11000110111011 <-- or something like that > > > Thoughts? > > -Matt > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > >>I need to store a bunch (and by a bunch, I mean about 30-40) binary >>true/false values in my database. >>In the past, I would do something like this: >>CREATE TABLE........... ( >> is_active tinyint(1) default 1, >> is_friend tinyint(1) default 1, >> is_something tinyint(1) default 1, >> is_something_else tinyint(1) default 1, >> ...... >> ); >>But that table would really get large if I had 30-40 extra columns in it. Hi Matt, Thanks for your question. AFAIK, the above is still the way it's done most of the time. From what you write below, it seems that you are trying to optimize the potential size of the database by being very parsimonious about the size and quantity of the fields. >>The other option was that I was considering a bit string: >>CREATE TABLE......... ( >> permissions mediumint(11) default 0 >>); >>INSERT INTO permissions (permissions) values (7); >>Since there are 3 bits that make up the integer "8" (or 0 - 7): >>1,2,4 >>This would mean that I could store 3 combinations of permissions, but it would be an integer. >>This could get even more complex if I had 30-40, as I could do a really large hex string, or just store the actual bit string: >>aef214 <--- one value >>11000110111011 <-- or something like that Here you are facing an issue between readability/ease of retrieval and space needed to store. I think that the idea of using a string of 0's and 1's in one field is interesting & useful, and is readable enough so that if something is awry you'd be able to find it fast. Some string- handling functions to pull out individual values & update the field as needed, and you're rolling. I'd suspect that in a very large database, by using one field of an appropriate size to store a string of 40 booleans, rather than 40 tinyint fields, you could save some really appreciable room. Kristina From ramons at gmx.net Sat Sep 19 18:35:14 2009 From: ramons at gmx.net (David Krings) Date: Sat, 19 Sep 2009 18:35:14 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: <9a0c4fc50909191205r721b417ew88a847a0b2782bff@mail.gmail.com> References: <59E89A80-51EA-4150-9B62-C06A708BB57F@gmail.com> <9a0c4fc50909191205r721b417ew88a847a0b2782bff@mail.gmail.com> Message-ID: <4AB55CA2.7060105@gmx.net> Matt Williams wrote: > So if the above is valid XML, is there a specific name for this approach? Is there a benefit for doing it this way instead of nested nodes? Might this be considered older method? > > > No, it's not an older method. There is no absolute definition of when to > use elements versus attributes. There are, however, some attempts at > defining general principles: > > http://www.ibm.com/developerworks/xml/library/x-eleatt.html The thing is that attributes have less overhead. So if you have many different elements that have a few properties using attributes shaves off a few characters. Then again, XML has a gigantic amount of overhead anyway, so why bother. One could also say that anything mandatory is to be an attribute while everything else is a sub-element. Haven't looked at the IBM page yet, so maybe my ideas are not on the money. In general, XML is made for machines to read, it is not fit for human consumption. David From danielc at analysisandsolutions.com Sat Sep 19 20:48:49 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Sep 2009 20:48:49 -0400 Subject: [nycphp-talk] Is this XML valid? In-Reply-To: References: Message-ID: <20090920004849.GA1081@panix.com> Hi David: > > > > > > That's not well-formed (valid) because there should be a closing tag at the end. > I was expecting each attribute and node to have it's own <> and , and > the data not to be surround by double-quotes or am I missing something? As others have mentioned, XML has "elements" (the stuff using <> and ) and "attributes" (the stuff inside the opening or empty element that use the name="value" format). --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From matt at atopia.net Sat Sep 19 21:46:13 2009 From: matt at atopia.net (Matt Juszczak) Date: Sat, 19 Sep 2009 21:46:13 -0400 (EDT) Subject: [nycphp-talk] Database, table, and column naming schemes In-Reply-To: <1253389918.29423@coral.he.net> References: <1253389918.29423@coral.he.net> Message-ID: > Here you are facing an issue between readability/ease of retrieval and > space needed to store. I think that the idea of using a string of 0's > and 1's in one field is interesting & useful, and is readable enough so > that if something is awry you'd be able to find it fast. Some string- > handling functions to pull out individual values & update the field as > needed, and you're rolling. > > I'd suspect that in a very large database, by using one field of an > appropriate size to store a string of 40 booleans, rather than 40 > tinyint fields, you could save some really appreciable room. Cool :) Thanks! I also think it will save not only space, but vertical size too. A bunch of is_* columns can just get overwhelming. From davidalanroth at gmail.com Sun Sep 20 00:31:39 2009 From: davidalanroth at gmail.com (David Roth) Date: Sun, 20 Sep 2009 00:31:39 -0400 Subject: [nycphp-talk] Is this XML valid? Message-ID: <2CF5E194-2134-490D-AA1A-FAC95D8BE04A@gmail.com> > Hi David: > > > > > > > > > > > > > > > That's not well-formed (valid) because there should be a closing > tag at the end. > > > > I was expecting each attribute and node to have it's own <> and >, and > > the data not to be surround by double-quotes or am I missing > something? > > As others have mentioned, XML has "elements" (the stuff using <> and > ) > and "attributes" (the stuff inside the opening or empty element that > use > the name="value" format). > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 As I mentioned in my original posting, this was a fragment. David Roth -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Sun Sep 20 00:43:24 2009 From: davidalanroth at gmail.com (David Roth) Date: Sun, 20 Sep 2009 00:43:24 -0400 Subject: [nycphp-talk] Is this XML valid? Message-ID: > No, it's not an older method. There is no absolute definition of > when to use > elements versus attributes. There are, however, some attempts at > defining > general principles: > > http://www.ibm.com/developerworks/xml/library/x-eleatt.html Thanks for the link and the code example, Mark. I certainly learned something here and realize my XML existence has been somewhat sheltered. In the absence of no absolute definition, I propose we refer to the more common XML expected as "The Popular XML" version. :-) I guess if approach XML as a programming language, then there are many methods to make use of it. I've thought of XML as I do HTML as being a format and not a programming language. I had a similar discussion years ago when someone argued that nroff was a language because it could do loops. David Roth -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Sun Sep 20 01:31:34 2009 From: davidalanroth at gmail.com (David Roth) Date: Sun, 20 Sep 2009 01:31:34 -0400 Subject: [nycphp-talk] Is this XML valid? (Matt!) Message-ID: <5301F490-06B7-4929-B623-3B1A23C52CB6@gmail.com> > No, it's not an older method. There is no absolute definition of > when to use > elements versus attributes. There are, however, some attempts at > defining > general principles: > > http://www.ibm.com/developerworks/xml/library/x-eleatt.html Thanks for the link and the code example, Mark. I certainly learned something here and realize my XML existence has been somewhat sheltered. In the absence of no absolute definition, I propose we refer to the more common XML expected as "The Popular XML" version. :-) I guess if approach XML as a programming language, then there are many methods to make use of it. I've thought of XML as I do HTML as being a format and not a programming language. I had a similar discussion years ago when someone argued that nroff was a language because it could do loops. David Roth PS: Matt, not Mark. Sorry about that. :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtbludgeon at gmail.com Sun Sep 20 11:35:16 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Sun, 20 Sep 2009 11:35:16 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <4AB51E5E.3080508@nyphp.com> References: <721f1cc50909190925m1205e214pd332a9937d6a7b78@mail.gmail.com> <4AB51E5E.3080508@nyphp.com> Message-ID: <721f1cc50909200835l374c6ae1le51508ac491beec9@mail.gmail.com> On Sat, Sep 19, 2009 at 2:09 PM, Michael Southwell < michael.southwell at nyphp.com> wrote: > David Mintz wrote: > >> I have been using Dreamhost because it's cheap and provides what I need >> and has a really weird and funny newsletter. >> > > with the emphasis on weird ;-) > > >> However, if you need a custom php.ini, the instructions are found at >> http://www.wiki.dreamhost.com/index.php/PHP.ini with a great big >> disclamer to the effect that if it suddenly breaks, you're on your own. Sure >> enough, my little php app suddenly broke. Tore my hair out for a while, then >> finally worked around. >> > > I have had the exact same experience. When you say "worked around," do you > mean that you couldn't solve the problem? What happened to me was that they > changed something which meant that the default path to mail was no longer > good, so I couldn't send mail; but when I finally figured that out, I fixed > it by setting the path and the issue was over. > Within a particular subdir of the site, I wanted to auto_prepend a file containing authentication logic, set my include_path to point to my personal library, etc. I ended up sticking the path to my libs in $_SERVER via SetEnv in a .htaccess so it wouldn't have to be hard-coded but once. Then I manually edited the few files to require() my auth.php, rather than auto_prepend it. I would have cheerfully used "php_value foo bar" in my .htaccess for all my initialization needs, but that technique evidently doesn't work when php is in cgi mode. > > >> Is the ability to customize your php.ini asking too much of a low-end >> shared-hosting provider? >> > > uhh, but in fact they did provide that for you (and me), no? They just > don't provide any support for it. > > I am having a polite little argument about that with them. I said, in substance, OK, so what is the official way to set up one's own php.ini, and they said we'll get back to you. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Sun Sep 20 12:53:30 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Sun, 20 Sep 2009 12:53:30 -0400 (EDT) Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <721f1cc50909200835l374c6ae1le51508ac491beec9@mail.gmail.com> Message-ID: On Sun, 20 Sep 2009, David Mintz wrote: > I am having a polite little argument about that with them. I said, in > substance, OK, so what is the official way to set up one's own php.ini, and > they said we'll get back to you. I still think vservers (like linode.com) are a better way to go. -- Aj. From oorza2k5 at gmail.com Sun Sep 20 12:55:38 2009 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Sun, 20 Sep 2009 12:55:38 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: References: <721f1cc50909200835l374c6ae1le51508ac491beec9@mail.gmail.com> Message-ID: <68de37340909200955u4011d4dfnbf8e79749a034e78@mail.gmail.com> On Sun, Sep 20, 2009 at 12:53 PM, Ajai Khattri wrote: > On Sun, 20 Sep 2009, David Mintz wrote: > >> I am having a polite little argument about that with them. I said, in >> substance, OK, so what is the official way to set up one's own php.ini, and >> they said we'll get back to you. > > > I still think vservers (like linode.com) are a better way to go. > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > I couldn't agree more. From edwardpotter at gmail.com Sun Sep 20 14:25:45 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Sun, 20 Sep 2009 14:25:45 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <68de37340909200955u4011d4dfnbf8e79749a034e78@mail.gmail.com> References: <721f1cc50909200835l374c6ae1le51508ac491beec9@mail.gmail.com> <68de37340909200955u4011d4dfnbf8e79749a034e78@mail.gmail.com> Message-ID: maybe something here: A Simple Shell Script to Create a Custom php.ini on Dreamhost?s Shared Host http://www.foryourlungsonly.net/2009/07/28/a-simple-shell-script-to-create-a-custom-php-ini-on-dreamhosts-shared-host/ PS, in 2000 we paid $25,000 every 4 weeks to host our site. I mean have to give these guys a little bit of leeway, the prices are rock bottom. If you have a serious site, you need to get a dedicated server. I think the issue with dreamhost, is no live support. I think that's a MAJOR problem. I'm surprised a company that brings in millions of dollars a month has not tackled that. Hostgator is fine by us, we have 100's of sites hosted there. ZERO problems. Online support in 30 seconds or less. Hard to top that. :-) On Sun, Sep 20, 2009 at 12:55 PM, Eddie Drapkin wrote: > On Sun, Sep 20, 2009 at 12:53 PM, Ajai Khattri wrote: > > On Sun, 20 Sep 2009, David Mintz wrote: > > > >> I am having a polite little argument about that with them. I said, in > >> substance, OK, so what is the official way to set up one's own php.ini, > and > >> they said we'll get back to you. > > > > > > I still think vservers (like linode.com) are a better way to go. > > > > -- > > Aj. > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > I couldn't agree more. > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Mon Sep 21 09:06:13 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Mon, 21 Sep 2009 09:06:13 -0400 Subject: [nycphp-talk] ADMIN - checking in on everything Message-ID: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> Hey everyone, I wanted to check in on everyone again and see how the list has been working for you. I know a few months ago some issues cropped up and I wanted to make sure they stay resolved. Please let us know if anything isn't working - and just a reminder - we always are happy to take any donation of any amount - just drop by the main site - http://www.politicslists.com Thanks as always -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Mon Sep 21 09:12:06 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Mon, 21 Sep 2009 09:12:06 -0400 Subject: [nycphp-talk] ADMIN - checking in on everything In-Reply-To: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> References: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> Message-ID: <002801ca3abd$20109cb0$6031d610$@horning@planetnoc.com> oops. wrong list completely sooo sorry -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Horning Sent: Monday, September 21, 2009 9:06 AM To: 'NYPHP Talk' Subject: [nycphp-talk] ADMIN - checking in on everything Hey everyone, I wanted to check in on everyone again and see how the list has been working for you. I know a few months ago some issues cropped up and I wanted to make sure they stay resolved. Please let us know if anything isn't working - and just a reminder - we always are happy to take any donation of any amount - just drop by the main site - http://www.politicslists.com Thanks as always -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Mon Sep 21 09:13:19 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Mon, 21 Sep 2009 09:13:19 -0400 Subject: [nycphp-talk] wrong list...... RE: ADMIN - checking in on everything In-Reply-To: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> References: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> Message-ID: <003b01ca3abd$4a798bb0$df6ca310$@horning@planetnoc.com> sorry -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Horning Sent: Monday, September 21, 2009 9:06 AM To: 'NYPHP Talk' Subject: [nycphp-talk] ADMIN - checking in on everything Hey everyone, I wanted to check in on everyone again and see how the list has been working for you. I know a few months ago some issues cropped up and I wanted to make sure they stay resolved. Please let us know if anything isn't working - and just a reminder - we always are happy to take any donation of any amount - just drop by the main site - http://www.politicslists.com Thanks as always -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) -------------- next part -------------- An HTML attachment was scrubbed... URL: From allen at TwoMiceAndAStrawberry.com Mon Sep 21 10:08:39 2009 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Mon, 21 Sep 2009 09:08:39 -0500 Subject: [nycphp-talk] ADMIN - checking in on everything In-Reply-To: <002801ca3abd$20109cb0$6031d610$@horning@planetnoc.com> References: <001401ca3abc$4d707a00$e8516e00$@horning@planetnoc.com> <002801ca3abd$20109cb0$6031d610$@horning@planetnoc.com> Message-ID: <4AB788E7.8000501@TwoMiceAndAStrawberry.com> Daniel Horning wrote: > > oops? wrong list completely > > sooo sorry > Ah, but you made me laugh, Dan. Nice way to start a Monday. Ha! -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From vtbludgeon at gmail.com Mon Sep 21 10:23:20 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Mon, 21 Sep 2009 10:23:20 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: References: <721f1cc50909200835l374c6ae1le51508ac491beec9@mail.gmail.com> <68de37340909200955u4011d4dfnbf8e79749a034e78@mail.gmail.com> Message-ID: <721f1cc50909210723x4254bd5dn2434757744511525@mail.gmail.com> On Sun, Sep 20, 2009 at 2:25 PM, Edward Potter wrote: > maybe something here: > A Simple Shell Script to Create a Custom php.ini on Dreamhost?s Shared Host > http://www.foryourlungsonly.net/2009/07/28/a-simple-shell-script-to-create-a-custom-php-ini-on-dreamhosts-shared-host/ > > That looks familiar -- I've seen it. It does essentially the same thing the manual instructions do. > > If you have a serious site, you need to get a dedicated server. I think > the issue with dreamhost, is no live support. I think that's a MAJOR > problem. I'm surprised a company that brings in millions of dollars a month > has not tackled that. > > @everyone else, thanks for the suggestions. Vserver indeed! really not all that much more expensive than shared, is it. And linode.com looks like so much fun, my mouth waters! (b/c my experience is limited to shared hosting and a managing couple of in-house (internal) LAMP servers at work, and this looks like the Real World) Dreamhost got back to be and essentially said, FY, albeit politely. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Mon Sep 21 12:32:36 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 21 Sep 2009 12:32:36 -0400 (EDT) Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <721f1cc50909210723x4254bd5dn2434757744511525@mail.gmail.com> Message-ID: On Mon, 21 Sep 2009, David Mintz wrote: > @everyone else, thanks for the suggestions. Vserver indeed! really not all > that much more expensive than shared, is it. And linode.com looks like so > much fun, my mouth waters! Awhile ago I compared some of the vserver hosting providers and linode.com comes out on top (max bang for buck). You can also build clusters with added private IPs - nodes can be in the same data center or you can ask to have them spun up in another of their data centers (currently, I think its CA, TX and NJ). Traffic between nodes using private IPs in the same data center doesn't count towards your (pretty generous) monthly bandwidth allowance. -- Aj. From leam at reuel.net Mon Sep 21 18:27:29 2009 From: leam at reuel.net (Leam Hall) Date: Mon, 21 Sep 2009 18:27:29 -0400 Subject: [nycphp-talk] SOA Definition/Explination? Message-ID: <4AB7FDD1.3040807@reuel.net> I'm posting this for a friend. She does some teaching for Systems Engineering. The big SE, not the MCSE type stuff. Her request is for a 2 page introduction to SOA that's not in geekish. If you're curious, INCOSE -- http://www.incose.org/ Thanks! Leam #### Does anyone know of a good top-level overview, geared toward systems engineers, of the Service-Oriented Architecture concept? (I.e. geared toward INCOSE-type SEs, not Microsoft-type SEs). The Wikipedia entry isn't bad, but I'd love to have a concise 2-page discussion I can give out to my students. Unfortunately, most discussions, however much they try to be overviews, tend to aim for the web guru...things like "idempotent" "stateful service", "registry", "partition your usage scenarios", (even "maximizes business agility") make it difficult to read the overview if you don't already know what you are talking about, and I'm looking for an overview specifically for people who don't know what it means. I want them to start seeing how what they do does and does not already use SOA concepts, so they have to know what those concepts are without actually doing software development for the web. #### From edwardpotter at gmail.com Mon Sep 21 19:43:06 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Mon, 21 Sep 2009 19:43:06 -0400 Subject: [nycphp-talk] SOA Definition/Explination? In-Reply-To: <4AB7FDD1.3040807@reuel.net> References: <4AB7FDD1.3040807@reuel.net> Message-ID: http://www.emptybottle.org/bullshit/ :-) Ok, if that does not cook it, think METAPHORS, based on HUMAN BEHAVIOR. Don't have any handy at the moment, but that will do the trick. Humans can respond to something based on a metaphor 100X better then some techno BS. :-) On Mon, Sep 21, 2009 at 6:27 PM, Leam Hall wrote: > I'm posting this for a friend. She does some teaching for Systems > Engineering. The big SE, not the MCSE type stuff. Her request is for a 2 > page introduction to SOA that's not in geekish. > > If you're curious, INCOSE -- http://www.incose.org/ > > Thanks! > > Leam > > #### > > Does anyone know of a good top-level overview, geared toward systems > engineers, of the Service-Oriented Architecture concept? (I.e. geared toward > INCOSE-type SEs, not Microsoft-type SEs). > > The Wikipedia entry isn't bad, but I'd love to have a concise 2-page > discussion I can give out to my students. Unfortunately, most discussions, > however much they try to be overviews, tend to aim for the web guru...things > like "idempotent" "stateful service", "registry", "partition your usage > scenarios", (even "maximizes business agility") make it difficult to read > the overview if you don't already know what you are talking about, and I'm > looking for an overview specifically for people who don't know what it > means. I want them to start seeing how what they do does and does not > already use SOA concepts, so they have to know what those concepts are > without actually doing software development for the web. > > #### > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From al.ko at webfoundation.net Tue Sep 22 12:16:37 2009 From: al.ko at webfoundation.net (Aleksey Korzun) Date: Tue, 22 Sep 2009 12:16:37 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: References: Message-ID: <656707536.20090922121637@webfoundation.net> Hello, Just wanted to throw in another suggestion of using Rackspace Cloud (http://www.rackspacecloud.com/); specifically their Cloud Servers offering. That is, if you are looking for something more flexible. I think pricing wise it's not bad at all given some extra benefits you can gain using their 'platform'. You can also use their API to interact with cloud server(s): http://github.com/AlekseyKorzun/php-cloudservers ;) -- Best regards, Aleksey Korzun www.webfoundation.net mailto:al.ko at webfoundation.net From paul at devonianfarm.com Tue Sep 22 12:40:47 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Tue, 22 Sep 2009 12:40:47 -0400 Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <656707536.20090922121637@webfoundation.net> References: <656707536.20090922121637@webfoundation.net> Message-ID: <4AB8FE0F.9030109@devonianfarm.com> Aleksey Korzun wrote: > Hello, > > Just wanted to throw in another suggestion of using Rackspace Cloud > (http://www.rackspacecloud.com/); specifically their Cloud Servers > offering. > > I still like the stability of just plain ordinary dedicated hosts. You just need one site that pulls in $250 a month to pay for hosting for a hundred smaller sites. You can install the PHP and other software you want (right now I have a PHP 5.2 and a PHP 5.3 server running side by side), and not deal with the weirdnesses that tend to exist with virtual servers: for instance, I used to be on a virtual server that did something strange that wouldn't let you compile GNU emacs. Six months ago I was running big batch jobs that took three days to run. I was thinking about going to Amazon EC2, Map/Reduce and all that. Then I thought through the problem again, compressed my data structures, put all of the random-access stuff into RAM and found my three day jobs became 20 minute jobs. When my data set gets 100x bigger (maybe in 2012) I'll need to think about cloud computing again. From ajai at bitblit.net Wed Sep 23 10:32:08 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 23 Sep 2009 10:32:08 -0400 (EDT) Subject: [nycphp-talk] does Dreamhost suck? In-Reply-To: <4AB8FE0F.9030109@devonianfarm.com> Message-ID: On Tue, 22 Sep 2009, Paul A Houle wrote: > I used to be on a virtual server that > did something strange that wouldn't let you compile GNU emacs. Funny, I have the exact opposite experience. I can build and run anything I like. -- Aj. From mitch.pirtle at gmail.com Wed Sep 23 13:52:40 2009 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 23 Sep 2009 13:52:40 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <602c8ac0909181857l4585c805nc426f8b3b7cc9aed@mail.gmail.com> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> <4AB34FEB.3000408@reuel.net> <602c8ac0909181857l4585c805nc426f8b3b7cc9aed@mail.gmail.com> Message-ID: <330532b60909231052v522fec0em4b0280a730a79776@mail.gmail.com> Joomla 1.5 is actually a framework and three apps built with that framework - the installer, the frontend, and backend. I used the framework to build the quizilla website for MTV, and only used what I needed - as a glue framework should be - and skipped dynamic navigation, timezone support, internationalization, and a bunch more. -- Mitch On Fri, Sep 18, 2009 at 9:57 PM, Mutaz Musa wrote: > >> * glue frameworks - like Zend and Joomla 1.5 > > Remember Joomla is a CMS not a framework. I've personally only ever used > CodeIgniter and Cake. Both were fine though Cake was a bit stifling with the > naming conventions. Documentation was good though and that made things > easier. I'm going to try Zend for my next project because I like the idea of > being able to use their classes on a needs-only basis. It seems more > flexible and more enterprise ready. At least that's the vibe I get. > > On Fri, Sep 18, 2009 at 5:16 AM, Leam Hall wrote: >> >> Awesome! >> >> Adrian Noland wrote: >>> >>> http://www.ibm.com/developerworks/opensource/top-projects/php.html >>> http://www.ibm.com/developerworks/opensource/library/os-php-read/ >>> >>> On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: >>> >>>> Anyone up for drafting a "Recommended Learning Program" for PHP? >>>> >>>> Thanks! >>>> >>>> Leam >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From brenttech at gmail.com Wed Sep 23 14:52:19 2009 From: brenttech at gmail.com (Brent Baisley) Date: Wed, 23 Sep 2009 14:52:19 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <4A90F358.3010405@nopersonal.info> References: <4A90F358.3010405@nopersonal.info> Message-ID: <5d515c620909231152g5e269ef6qa1c417adf54105c1@mail.gmail.com> On Sun, Aug 23, 2009 at 3:44 AM, lists at nopersonal.info wrote: > Hello ladies & gentlemen, > > I've just purchased my first book on PHP Object-Oriented Programming and > ?have also been looking at all the frameworks that abound. I'm unsure of > where to go from here. You should read the book. It will help you understand the frameworks, how they work, and how to code them. That said, all of the most popular frameworks add a fairly significant amount of overhead. If you need to create a high performance site, be prepared to jump into caching so the framework doesn't load on every page hit. Here is a kind of old report on benchmarking some frameworks to create "Hello World". http://avnetlabs.com/php/php-framework-comparison-benchmarks While you won't be creating a "Hello World" web page, an Ajax call would have similar processing requirements (not a lot of data, simple request). You should now how to create simple pages outside of any framework, for those simple solutions. Brent Baisley From yitzchak.schaffer at gmx.com Wed Sep 23 17:40:37 2009 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Wed, 23 Sep 2009 17:40:37 -0400 Subject: [nycphp-talk] Tidy code utils? Message-ID: <4ABA95D5.9090703@gmx.com> Hi all, In sitting down to hack an ancient, bizarrely-indented Perl open-source project just now, I shot it through Perltidy, and was downright excited at the fact that the code is now somewhat comprehensible. I remember having looked around for similar PHP projects, but nothing seemed fully-baked as Perltidy. Anyone have a recommendation? Many thanks, -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at gmx.com From lists at zaunere.com Wed Sep 23 19:00:24 2009 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 23 Sep 2009 19:00:24 -0400 Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection Message-ID: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> Hi all, As a precursor to the Yahoo Hack Day (free event, see http://icanhaz.com/yahoohacknyc for details and to register), we're pleased to hold a special presentation by YDN's Tom Hughes-Croucher on Thursday, October 8th (details to follow). We have some options for the presentation topic, which I've outlined below. Please provide feedback and votes on your favorite topic ASAP (either discuss on list, or vote by emailing me directly). Our options are: * Get any Web Data as if you are using SQL: a YQL quick-start guide * Accessibility: What, Why, How? * Mobile Data: how to avoid the latency trap when using web services Thank you to Yahoo and Tom for making this possible, and we look forward to your response. --- Hans Zaunere / Managing Member / New York PHP From oorza2k5 at gmail.com Wed Sep 23 19:42:59 2009 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Wed, 23 Sep 2009 19:42:59 -0400 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <4ABA95D5.9090703@gmx.com> References: <4ABA95D5.9090703@gmx.com> Message-ID: <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> On Wed, Sep 23, 2009 at 5:40 PM, Yitzchak Schaffer wrote: > Hi all, > > In sitting down to hack an ancient, bizarrely-indented Perl open-source > project just now, I shot it through Perltidy, and was downright excited at > the fact that the code is now somewhat comprehensible. > > I remember having looked around for similar PHP projects, but nothing seemed > fully-baked as Perltidy. ?Anyone have a recommendation? > > Many thanks, > > -- > Yitzchak Schaffer > Systems Manager > Touro College Libraries > 33 West 23rd Street > New York, NY 10010 > Tel (212) 463-0400 x5230 > Fax (212) 627-3197 > Email yitzchak.schaffer at gmx.com > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > There's source formatting (which is what I think you mean) built into Zend Studio; while not free, it's the only thing I know of that does this. From mutazmusa at gmail.com Wed Sep 23 20:32:09 2009 From: mutazmusa at gmail.com (Mutaz Musa) Date: Wed, 23 Sep 2009 20:32:09 -0400 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> References: <4ABA95D5.9090703@gmx.com> <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> Message-ID: <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> PDT for eclipse has the same feature. I'm not familiar with PerlTidy does it do anything more than fix indentations, position curly brackets, etc.? On Wed, Sep 23, 2009 at 7:42 PM, Eddie Drapkin wrote: > On Wed, Sep 23, 2009 at 5:40 PM, Yitzchak Schaffer > wrote: > > Hi all, > > > > In sitting down to hack an ancient, bizarrely-indented Perl open-source > > project just now, I shot it through Perltidy, and was downright excited > at > > the fact that the code is now somewhat comprehensible. > > > > I remember having looked around for similar PHP projects, but nothing > seemed > > fully-baked as Perltidy. Anyone have a recommendation? > > > > Many thanks, > > > > -- > > Yitzchak Schaffer > > Systems Manager > > Touro College Libraries > > 33 West 23rd Street > > New York, NY 10010 > > Tel (212) 463-0400 x5230 > > Fax (212) 627-3197 > > Email yitzchak.schaffer at gmx.com > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > > There's source formatting (which is what I think you mean) built into > Zend Studio; while not free, it's the only thing I know of that does > this. > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Wed Sep 23 23:25:38 2009 From: davidalanroth at gmail.com (David Roth) Date: Wed, 23 Sep 2009 23:25:38 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <330532b60909231052v522fec0em4b0280a730a79776@mail.gmail.com> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> <4AB34FEB.3000408@reuel.net> <602c8ac0909181857l4585c805nc426f8b3b7cc9aed@mail.gmail.com> <330532b60909231052v522fec0em4b0280a730a79776@mail.gmail.com> Message-ID: <6443591E-0A11-4130-8844-4E6933694D14@gmail.com> There is this link about Joomla Frameworks: http://docs.joomla.org/How_to_create_a_stand-alone_application_using_the_Joomla!_Framework Wasn't there a presentation about using the Joomla Frameworks, that might be online? David Roth On Sep 23, 2009, at 1:52 PM, Mitch Pirtle wrote: > Joomla 1.5 is actually a framework and three apps built with that > framework - the installer, the frontend, and backend. > > I used the framework to build the quizilla website for MTV, and only > used what I needed - as a glue framework should be - and skipped > dynamic navigation, timezone support, internationalization, and a > bunch more. > > -- Mitch > > On Fri, Sep 18, 2009 at 9:57 PM, Mutaz Musa > wrote: >> >>> * glue frameworks - like Zend and Joomla 1.5 >> >> Remember Joomla is a CMS not a framework. I've personally only ever >> used >> CodeIgniter and Cake. Both were fine though Cake was a bit stifling >> with the >> naming conventions. Documentation was good though and that made >> things >> easier. I'm going to try Zend for my next project because I like >> the idea of >> being able to use their classes on a needs-only basis. It seems more >> flexible and more enterprise ready. At least that's the vibe I get. >> >> On Fri, Sep 18, 2009 at 5:16 AM, Leam Hall wrote: >>> >>> Awesome! >>> >>> Adrian Noland wrote: >>>> >>>> http://www.ibm.com/developerworks/opensource/top-projects/php.html >>>> http://www.ibm.com/developerworks/opensource/library/os-php-read/ >>>> >>>> On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: >>>> >>>>> Anyone up for drafting a "Recommended Learning Program" for PHP? >>>>> >>>>> Thanks! >>>>> >>>>> Leam >>> From danielc at analysisandsolutions.com Thu Sep 24 00:05:27 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 24 Sep 2009 00:05:27 -0400 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <4ABA95D5.9090703@gmx.com> References: <4ABA95D5.9090703@gmx.com> Message-ID: <20090924040527.GA10330@panix.com> Hi Ytzchack: > I remember having looked around for similar PHP projects, but nothing > seemed fully-baked as Perltidy. Anyone have a recommendation? There's a PEAR package that does this: http://pear.php.net/package/PHP_Beautifier I haven't used the current release, so can't vouch for it. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From lists at nopersonal.info Thu Sep 24 01:28:26 2009 From: lists at nopersonal.info (lists at nopersonal.info) Date: Thu, 24 Sep 2009 01:28:26 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <5d515c620909231152g5e269ef6qa1c417adf54105c1@mail.gmail.com> References: <4A90F358.3010405@nopersonal.info> <5d515c620909231152g5e269ef6qa1c417adf54105c1@mail.gmail.com> Message-ID: <4ABB037A.40004@nopersonal.info> Brent Baisley wrote: > You should read the book. It will help you understand the frameworks, > how they work, and how to code them. > That said, all of the most popular frameworks add a fairly significant > amount of overhead. If you need to create a high performance site, be > prepared to jump into caching so the framework doesn't load on every > page hit. > Here is a kind of old report on benchmarking some frameworks to create > "Hello World". > http://avnetlabs.com/php/php-framework-comparison-benchmarks > > While you won't be creating a "Hello World" web page, an Ajax call > would have similar processing requirements (not a lot of data, simple > request). You should now how to create simple pages outside of any > framework, for those simple solutions. Thanks, Brent. I'll be sure to add your advice & link to my notes. Bev From yitzchak.schaffer at gmx.com Thu Sep 24 12:25:09 2009 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Thu, 24 Sep 2009 12:25:09 -0400 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> References: <4ABA95D5.9090703@gmx.com> <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> Message-ID: <4ABB9D65.5040603@gmx.com> Mutaz Musa wrote: > PDT for eclipse has the same feature. I'm not familiar with PerlTidy > does it do anything more than fix indentations, position curly brackets, > etc.? Perltidy deals with spacing, brackets, various and sundry code style issues, see http://perltidy.sourceforge.net/stylekey.html The granularity of config options is one of the cooler things about it, IMO - you can set it up for your shop's coding style. -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at gmx.com From mitch.pirtle at gmail.com Thu Sep 24 13:25:34 2009 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Sep 2009 13:25:34 -0400 Subject: [nycphp-talk] Advice on OOP & Frameworks In-Reply-To: <6443591E-0A11-4130-8844-4E6933694D14@gmail.com> References: <4A90F358.3010405@nopersonal.info> <4A912A3D.2030005@reuel.net> <1d8a0e930909161234p5c612cdah953f06f9f410af3c@mail.gmail.com> <4AB34FEB.3000408@reuel.net> <602c8ac0909181857l4585c805nc426f8b3b7cc9aed@mail.gmail.com> <330532b60909231052v522fec0em4b0280a730a79776@mail.gmail.com> <6443591E-0A11-4130-8844-4E6933694D14@gmail.com> Message-ID: <330532b60909241025u5b5477f8mf92ef23e1404cdb3@mail.gmail.com> Not sure about any presentations, but you can look at the installer app in the standard Joomla 1.5 download to see the simplest version of a framework app. -- Mitch On Wed, Sep 23, 2009 at 11:25 PM, David Roth wrote: > There is this link about Joomla Frameworks: > http://docs.joomla.org/How_to_create_a_stand-alone_application_using_the_Joomla!_Framework > > Wasn't there a presentation about using the Joomla Frameworks, that might be > online? > > David Roth > > On Sep 23, 2009, at 1:52 PM, Mitch Pirtle wrote: > >> Joomla 1.5 is actually a framework and three apps built with that >> framework - the installer, the frontend, and backend. >> >> I used the framework to build the quizilla website for MTV, and only >> used what I needed - as a glue framework should be - and skipped >> dynamic navigation, timezone support, internationalization, and a >> bunch more. >> >> -- Mitch >> >> On Fri, Sep 18, 2009 at 9:57 PM, Mutaz Musa wrote: >>> >>>> * glue frameworks - like Zend and Joomla 1.5 >>> >>> Remember Joomla is a CMS not a framework. I've personally only ever used >>> CodeIgniter and Cake. Both were fine though Cake was a bit stifling with >>> the >>> naming conventions. Documentation was good though and that made things >>> easier. I'm going to try Zend for my next project because I like the idea >>> of >>> being able to use their classes on a needs-only basis. It seems more >>> flexible and more enterprise ready. At least that's the vibe I get. >>> >>> On Fri, Sep 18, 2009 at 5:16 AM, Leam Hall wrote: >>>> >>>> Awesome! >>>> >>>> Adrian Noland wrote: >>>>> >>>>> http://www.ibm.com/developerworks/opensource/top-projects/php.html >>>>> http://www.ibm.com/developerworks/opensource/library/os-php-read/ >>>>> >>>>> On Sun, Aug 23, 2009 at 5:38 AM, Leam Hall wrote: >>>>> >>>>>> Anyone up for drafting a "Recommended Learning Program" for PHP? >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Leam >>>> > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From anoland at indigente.net Fri Sep 25 01:50:56 2009 From: anoland at indigente.net (Adrian Noland) Date: Thu, 24 Sep 2009 23:50:56 -0600 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <4ABB9D65.5040603@gmx.com> References: <4ABA95D5.9090703@gmx.com> <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> <4ABB9D65.5040603@gmx.com> Message-ID: <1d8a0e930909242250p3186d80apf8e6a32f4fcb0a97@mail.gmail.com> For code style there is Code Sniffer, also in pear. http://pear.php.net/package/PHP_CodeSniffer On Thu, Sep 24, 2009 at 10:25 AM, Yitzchak Schaffer < yitzchak.schaffer at gmx.com> wrote: > Mutaz Musa wrote: > >> PDT for eclipse has the same feature. I'm not familiar with PerlTidy does >> it do anything more than fix indentations, position curly brackets, etc.? >> > > Perltidy deals with spacing, brackets, various and sundry code style > issues, see http://perltidy.sourceforge.net/stylekey.html > > The granularity of config options is one of the cooler things about it, IMO > - you can set it up for your shop's coding style. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri Sep 25 07:42:29 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 25 Sep 2009 07:42:29 -0400 Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection In-Reply-To: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> References: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> Message-ID: <14fa01ca3dd5$433d9c40$c9b8d4c0$@com> All, We've gotten a limited response and I encourage people to take advantage of this opportunity to pick a topic from a top Yahoo developer. We will be submitting the topic this afternoon. H > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] On Behalf Of Hans Zaunere > Sent: Wednesday, September 23, 2009 7:00 PM > To: 'NYPHP Talk' > Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection > > Hi all, > > As a precursor to the Yahoo Hack Day (free event, see > http://icanhaz.com/yahoohacknyc for details and to register), we're pleased > to hold a special presentation by YDN's Tom Hughes-Croucher on Thursday, > October 8th (details to follow). > > We have some options for the presentation topic, which I've outlined below. > Please provide feedback and votes on your favorite topic ASAP (either > discuss on list, or vote by emailing me directly). > > Our options are: > > * Get any Web Data as if you are using SQL: a YQL quick-start guide > * Accessibility: What, Why, How? > * Mobile Data: how to avoid the latency trap when using web services > > Thank you to Yahoo and Tom for making this possible, and we look forward to > your response. > > --- > Hans Zaunere / Managing Member / New York PHP From kkrutoi at gmail.com Fri Sep 25 13:50:04 2009 From: kkrutoi at gmail.com (Konstantin K) Date: Fri, 25 Sep 2009 13:50:04 -0400 Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection In-Reply-To: <14fa01ca3dd5$433d9c40$c9b8d4c0$@com> References: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> <14fa01ca3dd5$433d9c40$c9b8d4c0$@com> Message-ID: <7173a2fc0909251050r71f7b0ccxb0655b7d8b6ddcc3@mail.gmail.com> Mobile data On Friday, September 25, 2009, Hans Zaunere wrote: > All, > > We've gotten a limited response and I encourage people to take advantage of > this opportunity to pick a topic from a top Yahoo developer. ?We will be > submitting the topic this afternoon. > > H > > > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org [mailto:talk- >> bounces at lists.nyphp.org] On Behalf Of Hans Zaunere >> Sent: Wednesday, September 23, 2009 7:00 PM >> To: 'NYPHP Talk' >> Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection >> >> Hi all, >> >> As a precursor to the Yahoo Hack Day (free event, see >> http://icanhaz.com/yahoohacknyc for details and to register), we're > pleased >> to hold a special presentation by YDN's Tom Hughes-Croucher on Thursday, >> October 8th (details to follow). >> >> We have some options for the presentation topic, which I've outlined > below. >> Please provide feedback and votes on your favorite topic ASAP (either >> discuss on list, or vote by emailing me directly). >> >> Our options are: >> >> ? ?* Get any Web Data as if you are using SQL: a YQL quick-start guide >> ? ?* Accessibility: What, Why, How? >> ? ?* Mobile Data: how to avoid the latency trap when using web services >> >> Thank you to Yahoo and Tom for making this possible, and we look forward > to >> your response. >> >> --- >> Hans Zaunere / Managing Member / New York PHP > > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From gatzby3jr at gmail.com Fri Sep 25 13:54:00 2009 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Fri, 25 Sep 2009 13:54:00 -0400 Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection In-Reply-To: <7173a2fc0909251050r71f7b0ccxb0655b7d8b6ddcc3@mail.gmail.com> References: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> <14fa01ca3dd5$433d9c40$c9b8d4c0$@com> <7173a2fc0909251050r71f7b0ccxb0655b7d8b6ddcc3@mail.gmail.com> Message-ID: <29da5d150909251054j3fb5337bwabdafe34274d13fa@mail.gmail.com> Mobile data On Fri, Sep 25, 2009 at 1:50 PM, Konstantin K wrote: > Mobile data > > On Friday, September 25, 2009, Hans Zaunere wrote: > > All, > > > > We've gotten a limited response and I encourage people to take advantage > of > > this opportunity to pick a topic from a top Yahoo developer. We will be > > submitting the topic this afternoon. > > > > H > > > > > > > >> -----Original Message----- > >> From: talk-bounces at lists.nyphp.org [mailto:talk- > >> bounces at lists.nyphp.org] On Behalf Of Hans Zaunere > >> Sent: Wednesday, September 23, 2009 7:00 PM > >> To: 'NYPHP Talk' > >> Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection > >> > >> Hi all, > >> > >> As a precursor to the Yahoo Hack Day (free event, see > >> http://icanhaz.com/yahoohacknyc for details and to register), we're > > pleased > >> to hold a special presentation by YDN's Tom Hughes-Croucher on Thursday, > >> October 8th (details to follow). > >> > >> We have some options for the presentation topic, which I've outlined > > below. > >> Please provide feedback and votes on your favorite topic ASAP (either > >> discuss on list, or vote by emailing me directly). > >> > >> Our options are: > >> > >> * Get any Web Data as if you are using SQL: a YQL quick-start guide > >> * Accessibility: What, Why, How? > >> * Mobile Data: how to avoid the latency trap when using web services > >> > >> Thank you to Yahoo and Tom for making this possible, and we look forward > > to > >> your response. > >> > >> --- > >> Hans Zaunere / Managing Member / New York PHP > > > > > > > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From randalrust at gmail.com Fri Sep 25 14:06:02 2009 From: randalrust at gmail.com (Randal Rust) Date: Fri, 25 Sep 2009 14:06:02 -0400 Subject: [nycphp-talk] Reading Dublin Core Nodes from Google Books XML Message-ID: I am having a terrible time trying to read Dublin Core nodes from a Google Books XML file. You can see the basic structure here: http://code.google.com/apis/books/docs/gdata/developers_guide_protocol.html#SearchingForBooks Here is the code that I am working with: $address = "http://books.google.com/books/feeds/volumes?q=$q&as-isbn=$isbn"; $page = file_get_contents($address); // $xml = new SimpleXMLElement($page); $item=$xml->entry[0]; $dc=$item->children("http://purl.org/dc/elements/1.1/"); echo $dc->creator; The XML is read just fine, but when I get to the DC elements, I get nothing. I am stumped. -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From lists at zaunere.com Fri Sep 25 14:19:42 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 25 Sep 2009 14:19:42 -0400 Subject: [nycphp-talk] Yahoo Special Presentation - Topic Selection In-Reply-To: <7173a2fc0909251050r71f7b0ccxb0655b7d8b6ddcc3@mail.gmail.com> References: <10de01ca3ca1$a26eebe0$e74cc3a0$@com> <14fa01ca3dd5$433d9c40$c9b8d4c0$@com> <7173a2fc0909251050r71f7b0ccxb0655b7d8b6ddcc3@mail.gmail.com> Message-ID: <15f901ca3e0c$c0b111c0$42133540$@com> >>> ? ?* Get any Web Data as if you are using SQL: a YQL quick-start guide >>> ? ?* Accessibility: What, Why, How? >>> ? ?* Mobile Data: how to avoid the latency trap when using web services Thanks all, Mobile Data it is. H From greg at freephile.com Wed Sep 30 00:06:11 2009 From: greg at freephile.com (Greg Rundlett (freephile)) Date: Wed, 30 Sep 2009 00:06:11 -0400 Subject: [nycphp-talk] Good DB abstraction layer Message-ID: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> I'm architecting the next-generation platform for web development at my company. I need to connect to a MSSQL Server for copying our data feed, and use PostgreSQL and MySQL locally. I'm looking at Symfony for application development and Drupal for Content Management plus functionality that fits well with the Drupal way. So, I expect that for the foreseeable future, I'll have a mixed DB environment. I see that Symfony uses PDO [1], which in turn has drivers for PostgreSQL and MySQL but the driver for MSSQL is marked 'experimental'. I'm wondering what approaches people have found successful and tips or advice in this area (mixed DB environments including MSSQL). For example, since I may also develop OpenOffice applications that interact with the PostgreSQL database through an ODBC driver, I am thinking using the PDO ODBC [2] driver to connect to MSSQL might also be better than using the 'experimental' MSSQL driver. I would like to avoid using specific extensions if possible (i.e. MSSQL extensions to PHP) since I'd like the code to be more cross-platform, simple, and easy. Thanks [1] http://propel.phpdb.org/trac/wiki/Users/Introduction/Requirements [2] http://us2.php.net/manual/en/ref.pdo-odbc.php Greg Rundlett nbpt 978-225-8302 m. 978-764-4424 -skype/aim/irc/twitter freephile http://profiles.aim.com/freephile From ajai at bitblit.net Wed Sep 30 11:51:07 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 30 Sep 2009 11:51:07 -0400 (EDT) Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> Message-ID: On Wed, 30 Sep 2009, Greg Rundlett (freephile) wrote: > For example, since I may also develop OpenOffice applications that > interact with the PostgreSQL database through an ODBC driver, I am > thinking using the PDO ODBC [2] driver to connect to MSSQL might also > be better than using the 'experimental' MSSQL driver. I would like to > avoid using specific extensions if possible (i.e. MSSQL extensions to > PHP) since I'd like the code to be more cross-platform, simple, and > easy. Are you plannng to use the ORM layers in symfony? If you do, then you will have to use PDO. -- Aj. From ajai at bitblit.net Wed Sep 30 11:54:21 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 30 Sep 2009 11:54:21 -0400 (EDT) Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> Message-ID: On Wed, 30 Sep 2009, Greg Rundlett (freephile) wrote: > [1] http://propel.phpdb.org/trac/wiki/Users/Introduction/Requirements BTW, FYI, Doctrine is destined to become the default ORM for symfony from 1.3 onwards (1.3 alpha was released a few days ago so its a safe bet it will be released in the next few months). So you may want to look at using Doctrine for your project. Oh, before I forget: http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer -- Aj. From lists at zaunere.com Wed Sep 30 14:14:21 2009 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 30 Sep 2009 14:14:21 -0400 Subject: [nycphp-talk] ConFoo - Call for Papers Message-ID: <060e01ca41f9$d58adc70$80a09550$@com> Hi all, Our friends to the north are working on what appears to be a bigger/better PHP Quebec conference. They are actively looking for speakers and have personally invited NYPHP members to submit talks, etc. Please see additional information below, and be sure to check out their site, www.confoo.ca. H ------------------------------------------- PHP Quebec, Montreal-Python, Ruby Montreal, W3Qc, and OWASP Montreal are organizing the first edition of the ConFoo.ca conference for Web technologies, which will be held in Montreal on March 10th through 12th, at the prestigious Hilton Bonaventure Hotel. We are looking for the best international speakers willing to share their experience and skills with programmers, managers and marketers. The conference is divided into two parts: A technical part, encompassing different aspects of Web development: PHP, Python, Ruby, security, CMSs and frameworks, databases, systems administration, Web standards, accessibility and agile methods. A management part: project management, referencing (SEO), Web marketing analysis, and social networking. The call for papers is open until November 13th. For more information regarding the conference and call for speakers, visit the conference website at http://www.ConFoo.ca From greg.rundlett at gmail.com Wed Sep 30 18:06:17 2009 From: greg.rundlett at gmail.com (G Rundlett) Date: Wed, 30 Sep 2009 18:06:17 -0400 Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: References: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> Message-ID: <5e2aaca40909301506l57483d07p8d316fe26eae96eb@mail.gmail.com> On Wed, Sep 30, 2009 at 11:54 AM, Ajai Khattri wrote: > On Wed, 30 Sep 2009, Greg Rundlett (freephile) wrote: > >> [1] http://propel.phpdb.org/trac/wiki/Users/Introduction/Requirements > > BTW, FYI, Doctrine is destined to become the default ORM for symfony from > 1.3 onwards (1.3 alpha was released a few days ago so its a safe bet it > will be released in the next few months). So you may want to look at using > Doctrine for your project. > > Oh, before I forget: > http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer > Thanks Greg Rundlett nbpt 978-225-8302 m. 978-764-4424 -skype/aim/irc/twitter freephile http://profiles.aim.com/freephile From guilhermeblanco at gmail.com Wed Sep 30 18:48:26 2009 From: guilhermeblanco at gmail.com (Guilherme Blanco) Date: Wed, 30 Sep 2009 19:48:26 -0300 Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: <5e2aaca40909301506l57483d07p8d316fe26eae96eb@mail.gmail.com> References: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> <5e2aaca40909301506l57483d07p8d316fe26eae96eb@mail.gmail.com> Message-ID: And surely... if you have any doubts.... There're a huge documentation, 2 mailing lists, 1 IRC channel... and my contact that you can pick! =D I'm one of the core developers of Doctrine! =P Cheers, On Wed, Sep 30, 2009 at 7:06 PM, G Rundlett wrote: > On Wed, Sep 30, 2009 at 11:54 AM, Ajai Khattri wrote: >> On Wed, 30 Sep 2009, Greg Rundlett (freephile) wrote: >> >>> [1] http://propel.phpdb.org/trac/wiki/Users/Introduction/Requirements >> >> BTW, FYI, Doctrine is destined to become the default ORM for symfony from >> 1.3 onwards (1.3 alpha was released a few days ago so its a safe bet it >> will be released in the next few months). So you may want to look at using >> Doctrine for your project. >> >> Oh, before I forget: >> http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer >> > > Thanks > > Greg Rundlett > > nbpt 978-225-8302 > m. 978-764-4424 > -skype/aim/irc/twitter freephile > http://profiles.aim.com/freephile > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9215-8480 MSN: guilhermeblanco at hotmail.com URL: http://blog.bisna.com S?o Paulo - SP/Brazil From mitch.pirtle at gmail.com Wed Sep 30 21:27:20 2009 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 30 Sep 2009 21:27:20 -0400 Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: References: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> <5e2aaca40909301506l57483d07p8d316fe26eae96eb@mail.gmail.com> Message-ID: <330532b60909301827q67cc8e08pd871f454f91d79e6@mail.gmail.com> Not to hijack the thread, but whatever came of PDO? I know there was that whole PDO-vs-MDB thang and then MDB2 and whatever, and never bothered to keep up. Now I got no idea what happened. -- Mitch, blushing ever so slightly On Wed, Sep 30, 2009 at 6:48 PM, Guilherme Blanco wrote: > And surely... if you have any doubts.... > > There're a huge documentation, 2 mailing lists, 1 IRC channel... and > my contact that you can pick! =D > I'm one of the core developers of Doctrine! =P > > Cheers, > > On Wed, Sep 30, 2009 at 7:06 PM, G Rundlett wrote: >> On Wed, Sep 30, 2009 at 11:54 AM, Ajai Khattri wrote: >>> On Wed, 30 Sep 2009, Greg Rundlett (freephile) wrote: >>> >>>> [1] http://propel.phpdb.org/trac/wiki/Users/Introduction/Requirements >>> >>> BTW, FYI, Doctrine is destined to become the default ORM for symfony from >>> 1.3 onwards (1.3 alpha was released a few days ago so its a safe bet it >>> will be released in the next few months). So you may want to look at using >>> Doctrine for your project. >>> >>> Oh, before I forget: >>> http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer >>> >> >> Thanks >> >> Greg Rundlett >> >> nbpt 978-225-8302 >> m. 978-764-4424 >> -skype/aim/irc/twitter freephile >> http://profiles.aim.com/freephile >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > > -- > Guilherme Blanco - Web Developer > CBC - Certified Bindows Consultant > Cell Phone: +55 (16) 9215-8480 > MSN: guilhermeblanco at hotmail.com > URL: http://blog.bisna.com > S?o Paulo - SP/Brazil > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation From greg.rundlett at gmail.com Wed Sep 30 22:50:00 2009 From: greg.rundlett at gmail.com (G Rundlett) Date: Wed, 30 Sep 2009 22:50:00 -0400 Subject: [nycphp-talk] Tidy code utils? In-Reply-To: <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> References: <4ABA95D5.9090703@gmx.com> <68de37340909231642n7fb9459p203eb1119d3463e3@mail.gmail.com> <602c8ac0909231732l307d854eha775d8d4b4b47245@mail.gmail.com> Message-ID: <5e2aaca40909301950h45a1899bv58aa9034ef93afab@mail.gmail.com> On Wed, Sep 23, 2009 at 8:32 PM, Mutaz Musa wrote: > PDT for eclipse has the same feature. Can you explain or point to how to make PDT clean up / format the PHP source? I was actually trying to integrate PHP_beautifier into PDT today because I wanted to clean the source. I didn't see how to get PDT to format source on it's own (except for formatting HTML attributes and such) and actually it didn't do too well with PHP_beautifier in the sense that I couldn't find a variable to substitute the file that I'm editing (It works on the file selected in the navigation pane). -- Greg Rundlett nbpt 978-225-8302 m. 978-764-4424 -skype/aim/irc/twitter freephile http://profiles.aim.com/freephile From oorza2k5 at gmail.com Wed Sep 30 23:01:32 2009 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Wed, 30 Sep 2009 23:01:32 -0400 Subject: [nycphp-talk] Good DB abstraction layer In-Reply-To: <330532b60909301827q67cc8e08pd871f454f91d79e6@mail.gmail.com> References: <5e2aaca40909292106h74a52358tc34fe1344a353bc0@mail.gmail.com> <5e2aaca40909301506l57483d07p8d316fe26eae96eb@mail.gmail.com> <330532b60909301827q67cc8e08pd871f454f91d79e6@mail.gmail.com> Message-ID: <68de37340909302001i1ceb1e3cx79d12b6c8e3cc8a0@mail.gmail.com> On Wed, Sep 30, 2009 at 9:27 PM, Mitch Pirtle wrote: > Not to hijack the thread, but whatever came of PDO? > > I know there was that whole PDO-vs-MDB thang and then MDB2 and > whatever, and never bothered to keep up. Now I got no idea what > happened. > > -- Mitch, blushing ever so slightly > It's been moved into the PHP core, is still actively developed and is generally considered the future of database interaction in PHP.