David, > =ex-Navy guys are always "at sea" - however they never let me near the ships, but I guess that's another > story...
ex RAF myself (almost 30 years ago though), so I suppose I might be all 'up in the air'? > > > > level). Once again we draw boxes (I have some wonderful s/w for doing > > these tasks, but it is M$). A single > > Visio? > > =yes - but as part of my venturing into LAMPs, I have been pointed to an equivalent package under Linux. > > > =understood - and so whilst you may not 'improve' the system design (the primary objective when developing on a > 'green field' site) it will help in your conversion to SQL/relational technology, as per below. > I'm sure it will. > =correct MySQL does not CURRENTLY have stored procedures, but it is under active discussion (too late for us, > but then...). > > =many people have a very shallow understanding of SQL - particularly [he says generalising like crazy] people > who 'fall into it' from (say) PHP programming. Indeed my own initial training course [mumble, mumble] years ago > majored on SELECT, charged through INSERT and DELETE, and settled lightly on DML. However there is enormous > power in the SELECT statement that belies the usual course topics of SELECT *... and SELECT colName, colName, > ... and a bit of format control/changing the column names/labels. In my training course, and many others I've > seen since, token gestures are made so that even throwing in MAX(), MIN(), and AVG() seems more an illustration > of (the more narrow) GROUP BY clause than it does of the SELECT statement. [rant, rave,...] This shallow > understanding means that 'they' will tend to do too much in PHP (assuming they know it better) in preference to > SQL - at a cost of efficiency/execution time. > > =let's make this answer a 'game of two halves': firstly, if you followed my earlier point, after producing ELH > diagrams, (my)/the next step is to start writing SQL queries. Thus one tries to pack as much functionality into > the SQL statement, as is possible. Each SQL query will feed some response 'back' to the PHP code (that in the > finished product, will first call it). Thus if you throw together the system's SQL calls in a previous > development step, the only PHP functionality required is that which cannot be accomplished within MySQL - so my > terminology may be flawed/deceptive, it is not that I'm taking stuff out of the PHP code (I haven't written any > yet/at this stage), it's that it never gets in there in the first place! Remember the mantra: prevailing wisdom > says that if you have a choice of doing something in SQL or PHP, do it in SQL. > > =there's an interesting problem on the list (in fact both PHP and PHP-DB) posed by Brian Tully "need help > looping through each record with a query -stumped". It is a much smaller/self-contained example than your own. > He has presented his 65-line, mainly-PHP code in his statement of the problem. It provided a brain-starting > challenge for me this morning, and I have opened my big mouth to suggest that we could get it down to a much > less complex single SQL call and one or two nested loops of PHP. To do this, I have requested some clarification > of the business rules governing his case. If it suits you, and assuming he gets back to me, I will work through > it. Could we then use this as an example of how to shift functionality out of PHP (the 'middle box') and into > SQL (the 'left-hand box')? Yes, please do. But if I could interject with a sub-concept question. Much of what I will be scratching my head about can probably be achieved with SQL as it pertains to data held. Can this fuctionality be built into MySQL or is it more a case of still doing it all in SQL but the SQL 'script' resides in the .php page? Just trying to see the trees instead of the wood. George --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01 _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]