Slashdot Mirror


Beginning PHP and MySQL

norburym writes "W. Jason Gilmore and Apress have put together an impressive volume, both in girth and content, in Beginning PHP 5 and MySQL, From Novice to Professional. At first glance, it appears that any technical manual that tries to approach such heady stuff such as PHP and MySQL for an audience ranging the span from beginner to the uber-geek is headed for failure. Happily, I can report that Gilmore and Apress have given the world one book that will replace many other PHP and MySQL volumes. This is one that the reader will consistently rely on and keep near to hand." Read on for the rest of Norbury-Glaser's review. Beginning PHP and MySQL: From Novice to Professional author W. Jason Gilmore pages 800 publisher Apress rating 9 reviewer Mary Norbury-Glaser ISBN 1893115518 summary PHP and MySQL

One key to the book's success is the manner in which Gilmore approaches his subjects. The text is split neatly into three sections: the first deals exclusively with PHP and comprises the bulk of the book's content, the second section goes into depth with MySQL and the final chapters deal with PHP/MySQL integration. This layout is where the promise of appealing to such a wide range of user abilities succeeds admirably. The beginner can read cover to cover and come out of the pipe with a solid, practical knowledge of PHP, MySQL and how to combine the two to build advanced web applications. An experienced MySQL or PHP guru can skip the area of his expertise and gain much from the chapters on the other. A more advanced user can use this book as reference material, skim the chapter outline, pick and choose topics of interest and quickly find the answers they seek. Everything is cleanly written, with little or no anecdotal filler or asides. Each chapter begins with a nice overview of what will be covered and ends with a brief but concise summary.

Gilmore begins with nine chapters specific to the PHP language and its many core features and extensions, taking particular care over installation and configuration issues (platform specific instructions are included for UNIX/Linux (Mac OS X users can swim in this pool very easily) and Windows), basics (data types, variables), functions, arrays, PHP's object-oriented functionality and expressions. The next ten chapters delve deeper into PHP's file and operating system functions, web form integration, http authentication, file upload management, LDAP, session management (one of the best aspects of PHP and incredibly easy to use), Web Services (SOAP, SimpleXML extensions as well as NuSOAP and MagpieRSS -- cool stuff!), security and PHP's SQLite database extension. SQLite is an exciting multi-platform database engine that will most likely prove to be hugely popular in the near future. It's interesting to note that Apple plans to integrate SQLite into their next release of OS X, Tiger. Also of note is Gilmore's well-written chapter on PHP and LDAP. He provides an extremely competent introduction to LDAP and PHP's LDAP extension. If you work in an enterprise environment, this knowledge will become an integral part of your mindset and vocabulary.

The SQL section of the book is compact and concise. Gilmore manages to take the reader through a fast but detailed introduction to MySQL. Installation and configuration, clients (the standard set and some GUI based administration clients), table structures and security/user management are all explained with precision and an eye toward practical expectations.

Chapters 26 through 30 stand out, with an integrated approach to both PHP and SQL. This is where Gilmore pulls it all together. The reader is introduced to PHP's MySQL functionality, creating MySQL database classes, indexing and searching, transactions and importing and exporting data. There are numerous excellent real-world examples throughout this section that will enable the reader to create elegant, advanced web applications.

Gilmore removes the complexity and ambiguity inherent in many technical books and gives the reader a detailed approach to these two wildly popular open source packages. Beginning PHP 5 and MySQL will definitely serve the novice, the professional and those in between. For anyone wondering what all the fuss is about with PHP or MySQL or for anyone who has wanted that one volume that will explain it all, this is definitely the book for you. It is at once an excellent tutorial and an indispensable reference manual.

You can purchase Beginning PHP and MySQL: From Novice to Professional from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

228 comments

  1. other training materials here... by ubiquitin · · Score: 5, Informative

    For the basics, there's an online course that I put together for an undergradute class last year here: PHP Consulting training.

    --
    http://tinyurl.com/4ny52
    1. Re:other training materials here... by Anonymous Coward · · Score: 0

      "For the basics, there's an online course that I put together for an undergradute class last year here"

      But would it still be 10Mb of files if the pages were text or html?

    2. Re:other training materials here... by Anonymous Coward · · Score: 0

      this guy is either blind or too lazy to convert the presentation pdfs to a smaller font. i hope he dies

    3. Re:other training materials here... by Anonymous Coward · · Score: 0

      This is really nice. Thank you for this contribution.

    4. Re:other training materials here... by Anonymous Coward · · Score: 2, Insightful

      only on slashdot could these assholes complain about the format and font sizes of free documents. get a life guys and produce something yourselves instead of ripping on someone who offered up his creation for free.

      thanks to ubiquitin for the free docs.

    5. Re:other training materials here... by mcovey · · Score: 1

      I had preordered and have now read this book. It was an excellent launch pad for me and serves as a handy manual for when I can't get something quickly from google. PHP ended up being pretty easy for me, and has helped me start learning C because of similar syntax.

      I only read the first few PHP chapters and the first few MySQL chapters, I've gotten the rest of what I know from the web, but that's just how i learn.

      --
      Amen.
    6. Re:other training materials here... by farrellj · · Score: 1

      Hey, thanx for the course. I recently decided to learn PHP as it seems to be a very powerful language for doing web-based stuff.

      ttyl
      Farrell

      --
      CAN-CON 2019 - Ottawa's only book oriented Science Fiction Convention! October 18-20, Sheraton Hotel, Ottawa, Canada h
    7. Re:other training materials here... by imroy · · Score: 2, Interesting

      Powerful it is not. In fact, it's a fricking mess. The only thing it has going for it is that it's popular and available on almost every web host.

    8. Re:other training materials here... by o0ps · · Score: 1

      Thanks very much this - just to be picky was class4 a bit boring ? As it doesnt seem to be present.

    9. Re:other training materials here... by shelterit · · Score: 2, Insightful

      Uh, this article on "problems" I found rather "looking for trouble"ish. You can create crap code examples in any language. If the article is meant to keep beginners from learning PHP, they fail because PHP is easy tp pick up for simple stuff. If it is to warn against it in professional / enterprise environments, they fail, because professionals don't do a lot of the stupid things the examples show. However, people going from newbie to cluie might bump into some of these problems, but for heavens sake; mention me one language that hasn't got similar problems! For the record, I use both Java and PHP for enterprise applications, and the golden rule is; use the language that best fits the job. I'm using PHP more and more, after being professional with Java for over 4 years, and I can write an article twice as long on the perils of Java. Look at good PHP code, both functional and OO; it can be very effective and scalable.

      --
      -- Home, James - it doesn't matter where that thing has b
    10. Re:other training materials here... by imroy · · Score: 2, Interesting

      I think you missed the point of the article I linked to. You're talking mostly about the use of a language and its users. Of course a good/bad coder can write good/bad code, that's what makes them good/bad! The point, as I see it, is that PHP is really a very simple language that has been extended and hyped beyond its capacity. Of course there are places where it is well suited. Mostly simple homepages. Even Yahoo! is switching to it, but only (as I understand) as a template language. The underlying logic will be written in something else and will then throw variables at a PHP template. PHP is unsuitable as a general-purpose language, especially in large projects, because it lacks namespaces (hello global variables!) and has many ugly idiosyncrasies. The most insightful part of the linked article is on Oversimplification Leading to Excessive Complexity:

      PHP 2 was probably a reasonable solution: it was a minimal scripting language for adding dynamic behaviour to webpages. Unfortunately, PHP has since outgrown itself. PHP is nowadays a programming language simplified to the point where the available abstractions and concepts just aren't sufficient to express the programmer's intent.

      I have looked at PHP code from time to time and it has never impressed me. To me it always looks like a poor impression of Perl done by a VB coder. It's a language designed by a large group of coders who seem to have none of the insight into language design of the Perl crowd. Part of that comes down to history and experience. Perl 5 alone is almost 10 years old while PHP started only about 5 years ago. Maybe PHP5 and beyond will finally pick up the loose ends, but only time will tell.

    11. Re:other training materials here... by ubiquitin · · Score: 1

      Class 4 was a hands-on session which introduced the topic of PHP debugging : see for example, the recent O'Reilly article on debugging.

      --
      http://tinyurl.com/4ny52
  2. Why MySQL? by Megaweapon · · Score: 4, Informative

    I've found PostgreSQL to be an easier database to work with and admin. When properly tuned I can't tell the difference between the two for most queries. Just my $0.02.

    --
    I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
    1. Re:Why MySQL? by Anonymous Coward · · Score: 0

      Obligatory link

    2. Re:Why MySQL? by arevos · · Score: 4, Insightful

      My guess is that more hosting firms offer MySQL than PostgreSQL. If I'm correct, then it would make sense for them to appeal to the wider audience.

    3. Re:Why MySQL? by Anonymous Coward · · Score: 1, Insightful

      Hell, I'd gladly accept a slight performance cut for the many benefits PG has over MySQL. To new MySQL users: You'll be kicking yourself later on after realizing MySQL didn't deliver the power you needed.

    4. Re:Why MySQL? by ttfkam · · Score: 1

      More hosting of MySQL means more books. More books means more hosting.

      So when are people going to step back and realize, "Hey! This isn't very good?" Although with PHP 5.0 it looks like that community is trying to clean up their act, MySQL is still a steaming pile with hackish functionality tacked on top.

      The string "the giant purple crayon" should never be allowed in an integer field let alone without at least a warning dammit!

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    5. Re:Why MySQL? by Anonymous Coward · · Score: 0

      SO TRUE! I started a web project with MySQL backend because that was what the hosting company we were with offered on their development server. Now that the customer wants more advanced auditing and a few other features, we have realized that we would really save a lot of development time and improve the quality of our code with the ability to use triggers/stored procedures which are not offered by MySQL. I also have a feeling that for the latest versions, the reduced performance of Postgres exists primarily in the imagination. I'm about to migrate the codebase to Postgres (fortunately I used ADODB) so I'll find out soon enough.

    6. Re:Why MySQL? by ahdeoz · · Score: 1

      That's nice, but most of the ease of administration comes from not having to do things like properly tune and jump through configuration hoops. This is where mysql succeeds for most cases.

    7. Re:Why MySQL? by Anonymous Coward · · Score: 0

      Postgres can't do easy FULLTEXT searches like MySQL can. That's my #1 reason for using it. MySQL's ubiquity is just icing on the cake.

    8. Re:Why MySQL? by ScribeOfTheNile · · Score: 1
      The string "the giant purple crayon" should never be allowed in an integer field let alone without at least a warning dammit!

      That statement is false. I'm currently running MySQL 4.0.20, and text is unable to be entered into integer fields.
    9. Re:Why MySQL? by ingeborgsjon · · Score: 0

      Most benchmarks I've read puts MySQL (InnoDB tables) well above PostgreSQL.

    10. Re:Why MySQL? by ttfkam · · Score: 1
      My statement was true. I'm currently running MySQL 4.0.21, and text is able to be entered into integer fields without error or warning.
      mysql> create table slashdotproof (numbers_only INT);
      Query OK, 0 rows affected (0.06 sec)

      mysql> insert into slashdotproof (numbers_only) values ('the giant purple crayon');
      Query OK, 1 row affected (0.00 sec)

      mysql> select * from slashdotproof;

      numbers_only

      0

      1 row in set (0.00 sec)
      Note: select output edited for slashdot junk filter

      'the giant purple crayon' is not equal to 0 in any programming language or any other database management system that I am aware of. My string has been converted to an integer with loss of data in the conversion. This was done without an error or warning.

      Ergo, MySQL is a steaming pile.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    11. Re:Why MySQL? by Anonymous Coward · · Score: 0

      If everybody says Postgres has so many features over mySQL I'm pretty sure it can do FULLTEXT too. Anybody know for sure?

    12. Re:Why MySQL? by ttfkam · · Score: 1

      Yes, PostgreSQL can do fulltext searches.

      With the tsearch2 module, you can even order results by relevance/accuracy rather than just return in row order.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    13. Re:Why MySQL? by ScribeOfTheNile · · Score: 1

      Sorry, I thought you meant it allowed text to actually be stored within an integer field, rather than converting it to 0. It is stupid it doesn't throw a warning. =)

    14. Re:Why MySQL? by Cajal · · Score: 1

      This is because MySQL silently creates default values for every column. It uses "" for VARCHAR columns and 0 for numeric columns. So when you try to insert a string into an integer column, it's using the default value. Why its creators decided to implement this "feature" escapes me.

  3. Switch from asp - php(5) by Albert+Sandberg · · Score: 3, Informative

    I'm a good asp programmer with a lot of access and sql server experience, how will this book help me from that standpoint, will it help me to set up php and mysql with at least some pointers on a linux system?

    Anyone who has done the above step and can recommend this book for me? Other suggestions?

    Thanks
    Albert "thec" Sandberg

    1. Re:Switch from asp - php(5) by Albert+Sandberg · · Score: 1

      Damnit, I just missed that yes, it will direct me with instructions for installing php and sql, but still, how have you managed to go from asp to php with the help of this book?

    2. Re:Switch from asp - php(5) by yohan1701 · · Score: 5, Insightful

      If you are unfamilar with linux and only want to learn php just install mysql and php on a windows box.

      The setup is pretty easy getting php send email is the most difficult part.
    3. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 0

      Are you genuinely joining the revolution or are you new? ASP and Access are things people around here commonly do but do not talk about. ;-)

      In other news, I was a php user long before I ran into ASP (before .NET). For good ol' regular web dev, it's probably very similar. There's actually someone who does a PHP/ADO thing to ease the transition even more.

      Then there's that utility that does ASP2PHP -- maybe run a few of those ASP scripts and check the output to see how it translates. Of course the php.net site with its documentation -- they're awesome.

    4. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 2, Funny

      I'm a good asp programmer with a lot of access and sql server experience

      You have condolences.

    5. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 3, Funny

      Either you just got slashdotted or you really need to join the rebellion hasta pronto. :)

      thec.org reads as follows:

      Microsoft JET Database Engine error '80004005'

      Unspecified error /include/session.asp, line 9

    6. Re:Switch from asp - php(5) by downward+dog · · Score: 3, Informative

      What would motivate you to switch?

      I've done quite a bit of both ASP and PHP. Both languages are pretty good for web development, and in a lot of ways they're comparable. However, PHP5 moves PHP in the right direction, especially in terms of object orientation and XML. And personally I think .NET moves ASP in the wrong direction.

      In terms of moving from one to the other, you could probably move to intermediate PHP proficiency quickly, with just a good PHP book and a few projects to build. The two languages have very little in common syntactically, but on a conceptual level they are similar.

      If you know Javascript or C or (especially) Perl, and you work freelance / your boss doesn't care / you don't care what your boss says, then I say go for it.

    7. Re:Switch from asp - php(5) by FuzzyBad-Mofo · · Score: 0, Flamebait

      Because mail($to, $subj, $body, $headers); is sooooo difficult..

    8. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 0

      IIS

    9. Re:Switch from asp - php(5) by mdfst13 · · Score: 1

      " Because mail($to, $subj, $body, $headers); is sooooo difficult.."

      No, because MS Windows does not come with a mail server preinstalled. To get it to send email one must either install a mail server or use code that handles the SMTP connection manually (rather than the mail() function).

      ASP uses the SMTP connector that comes with IIS; Apache/PHP do not come with an SMTP connector -- one must be installed separately.

      Btw, I use Apache2Triad to simplify the Apache/MySQL/PHP install on MS Windows (XP). Others swear by EasyPHP (which works more in the win9x fashion).

    10. Re:Switch from asp - php(5) by FuzzyBad-Mofo · · Score: 1

      Ah, I didn't think about it from a Windows perspective. I've found that sending mail from ASP is equally difficult, especially since Micros~1 decided to break the way the IIS mailer works between NT, 2K, and XP.

    11. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 0

      Good summary for ASP to PHP switching here: http://phplens.com/phpeverywhere/node/view/30

    12. Re:Switch from asp - php(5) by PostFutura · · Score: 1

      I haven't read the book, but i myself code asp at work and php for hobby.

      The first web-scripting language i learned was asp, mainly becouse i'm a windoze idiot and i liked IIS. At my work we used asp & access in the beginning, then moved over to MS SQL server. Then i studied php and switched over to Apache+php (mysql) on my home-server. Nowadays i only code asp at work, everywhere else i use php. And my boss switched over to a linux server with apache + Chilisoft! ASP (now Sun) and mysql.

      I didn't have any bigger problems learning php. One reason can be that i have no problems reading code, even if it's written in COBOL. The web-manual is the best tool, and it's the only resource that i have used. Start with some tutorials and small examples, just Google around!

      I started here:
      http://fi2.php.net/manual/en/tutorial.php
      And to get some examples to study (and copy&paste in the beginning..) navigate to:
      http://www.hotscripts.com/PHP/index.html.

      Learn PHP, you life will never be the same again ;-)

      --
      I don't know what i'm talking about so could you Please stop reading my post.
  4. I used to swear by MySQL by suso · · Score: 3, Insightful

    but now I'm using Postgres and am lovin it. It's one of those things when you didn't know what the hell you were doing before you knew about it.

    Postgres is where it is at.

    1. Re:I used to swear by MySQL by Anonymous Coward · · Score: 1, Funny

      yeah .. i used to swear by mysql as well .. then
      i tried out postgres and ditched mysql .. then
      after watching postgres' query logic bomb out on
      things that mysql easily handled i ditched postgres
      completely and moved back to mysql

      screw postgres .. if i need a trigger i'll buy
      a glock

    2. Re:I used to swear by MySQL by downward+dog · · Score: 2, Interesting

      They each have their place... But doesn't it seem like they're converging? MySQL used to be the "fast" one, great for reads but not writes, while PostgreSQL was the "advanced" one with transactions, views, subselects, etc. But now PostgreSQL is getting faster, and MySQL has transactions and subselects, with views and stored procedures on the way?

      So what separates PostgreSQL from MySQL these days?

    3. Re:I used to swear by MySQL by Per+Wigren · · Score: 1

      Hear, hear!

      Since I started using triggers, checks and functions/stored procedures when modelling my databases I can no longer understand why people use MySQL.. PostgreSQL is so much better than MySQL in every single way I can think of! Looking at the MySQL TODO-list I will take a look at it again after 5.1 is released but until then I consider it a toy. At least for applications more advanced than a personal blog..

      --
      My other account has a 3-digit UID.
    4. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      Here we go. MySQL vs. Postgres. The post says nothing, but "postgres is where it is at", and gets modded insighful instead of offtopic or flamebait.

      Vi rules!

    5. Re:I used to swear by MySQL by dfetter · · Score: 3, Interesting

      There are quite a few differences, most succinctly described at http://sql-info.de/mysql/gotchas.html and http://sql-info.de/postgresql/postgres-gotchas.htm l

      PostgreSQL is under a very clear license: BSD.
      MySQL is under a very clear license, too: Whatever MySQL AB Feels Like Doing Right This Minute.

      I do not need to repeat the earlier comments about the differences between what MySQL AB promises and what it delivers, but suffice it to say that those differences are comparable to any other sleazy proprietary software vendor.
      --

      --
      What part of "A well regulated militia" do you not understand?
    6. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      PostgreSQL has had this 'advanced' functionality for years whereas MySQL is just tacking it on now. With development schedules as tight as they are, I think I will choose the battle-tested one. For personal projects, sure, I'll want to know both because it can be tough for people to get access to PostgreSQL in shared hosting environments. However, Fedora Core still ships with MySQL 3 (!!!) and a lot of hosts will only offer that. I figure it will be a few more years until MySQL 4 is offered almost universally and MySQL 5 (which will have views, subselects and stored procedures) will take many more years for the general public to get access to. I suspect that PostgreSQL will hit shared hosting long before MySQL 5.

      For business projects, I think the clear choice is to start with PostgreSQL due to acquisition cost (and the BSD license doesn't hurt for sales of complete solutions). If company policies change somewhere down the line and you need to move to a commercial system like Oracle, you may need to port your stored procedures (not sure, haven't performed such a conversion) but at least you haven't put a truckload of extra code into your front-end because MySQL didn't support feature x. Trying to simulate features that undeniably belong on the back-end with PHP (or any language) will only lead to bloated code that has more bugs than an equivalent system built with a lightweight front-end and a more powerful back-end. Once you finally realize that your project will fail with MySQL, you will end up ripping all of that bloat out anyway.

      If you are lucky enough to have access to either MySQL 5 or PostgreSQL, maybe there is no real difference that developers should concern themselves with. However, as their feature sets converge and these more robust databases become more accessible, it will probably become increasingly more important to learn the quirks of each so if the client (perhaps foolishly) wants to specify the DBMS you are prepared.

    7. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      Well, I would prefer the cleaner and more "complete" solution that has been optimized without giving up correctness and clean design, than the hackish solution that has been pushed towards correctness while still lacking clean design obviously.

    8. Re:I used to swear by MySQL by theoddball · · Score: 1
      Postgres is where it is at.

      You're telling me. For a long time, I'd been using PHP + MySQL for web-based data-entry programs for my company. (Because, well, I basically have zero budget.)

      I just started playing with Postgres a few weeks ago, and it's a godsend. The databases I work with are spaghetti-piles, even after normalization, that have lots of relationships that must be maintained between tables. Foreign keys + cascades = serenity. Not to mention stored procs, triggers... for my purposes, there's not much comparison.

    9. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      There are quite a few differences, most succinctly described at http://sql-info.de/mysql/gotchas.html and http://sql-info.de/postgresql/postgres-gotchas.htm l

      fucking $DEITY. reading through that list really shows mysql's "design" process. fucking ugly.

      mysql> SELECT 1/0;
      +------+
      | 1/0 |
      +------+
      | NULL |
      +------+
      1 row in set (0.02 sec)


      also

      The MySQL server only performs basic checking on the validity of a date: days 00-31, months 00-12, years 1000-9999. Any date not within this range will revert to 0000-00-00. Please note that this still allows you to store invalid dates such as 2002-04-31. It allows web applications to store data from a form without further checking. To ensure a date is valid, perform a check in your application.

      emphasis mine. makes you wonder whether they set aside some monkeys to write that piece of shit.

      seriously, anyone considering this atrocity for even modest work must be retarded.

    10. Re:I used to swear by MySQL by suso · · Score: 1

      screw postgres .. if i need a trigger i'll buy
      a glock


      Haha, now that.. that's funny.

    11. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      nah we all know Emacs is the greatest ;)

    12. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      mysql flies very nicely in a heavy production
      environment with little maintenance. postgres,
      on the other hand, requires a fair amount of
      upkeep to keep it smooth. unless you need the
      advanced functionality postgres provides, mysql
      is a perfectly good choice for light to medium
      applications. if you're wanting to store a few
      hundred million rows of something, go buy oracle.
      otherwise either mysql or postgresql will fit
      the bill .. which you choose depends on how you
      use, but neither of them are necessarily a Bad
      choice .. i use both in several capacities .. i
      tend to deploy postgres when i need very specific
      functionality .. for simple storage and retrieval
      i see no benefit to postgres over mysql .. while
      this may count as 'no more advanced than a
      personal blog' the fact is that most data driven
      applications aren't much more complex than this.
      neither postgresql or mysql are what can be
      considered 'big iron' in terms of RDBMS' ( tho
      postgres comes closer in that regard )

    13. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      the cascading is a beautiful thing, true .. but
      as for your tables being spaghetti, well

      databases and schemas don't create themselves ;)
      code doesn't write itself ( well, we'll leave
      truly advanced coding out of it because that has
      nothing to do with what we're talking about ).

      the spaghetti structure was created by the DBA.
      when creating a data driven app, plan carefully
      ahead of time .. think in terms of extensibility.
      comb over your data paradigm until you have a very
      clear mental picture of what your data Really is,
      then design the schema. if you do this correctly
      mysql will serve you just as well as postgres.

      planning out your schema ahead of time is much
      more important than planning out your code ahead
      of time. the code serves the data.

    14. Re:I used to swear by MySQL by E_elven · · Score: 1
      Postgres is where it is at.

      No, I'm sorry. SQLite is where 'it' is (at).
      --
      Marxist evolution is just N generations away!
    15. Re:I used to swear by MySQL by aled · · Score: 1

      Yeah, just try to not be near the AC when he needs a trigger...

      --

      "I think this line is mostly filler"
    16. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      Can you download and use PostgreSQL in your project with no limitations on use? Yes.

      Can you download and use MySQL in your project with no limitations on use? Yes.

      What do I care about the rest of the license FUD?

    17. Re:I used to swear by MySQL by imroy · · Score: 1

      Those two pages are a great source of information. Notice how short the PostgreSQL page is? :)

      What always struck me with the MySQL gotchas page was that the SQL parser and the underlying attitude of MySQL is the real problem. Everyone always brings up *features* like triggers and stored procedures when criticizing MySQL, but look at all the gotchas where it will accept invalid data and not throw an error. It will even change your table definition in subtle but important ways, still without throwing an error. This is a RDBMS that is not to be taken seriously. When you're dealing with important information you want to know about any problem. Instead, MySQL seems happy to fudge it to what you probably meant to do. So instead of knowing about a problem immediately, your database can hold invalid data and cause problems later on. Until MySQL AB fixes this mis-feature it will not be taken seriously.

    18. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      I'm proud of all of your former mysql users. I was saying this here on slashdot 4 years ago and getting flamed for it.

      MySQL vs. [insert database here]
      speed tests have always been biased, and of course "MySQL is the fastest database". It's faster, especially when you don't use stored procedures, and don't turn off features of enterprise class databases such as, I don't know, transaction logging, and the rest of the stuff that makes an EC database an EC database.

      When you run MySQL against PostgreSQL and you run postgres in 'ghetto' mode, with your db code in your PHP, of course it will be slower.

      I've said it before, and I'll say it again, use stored procedures, write them in C, and do a speed comparison. Transactions and all, postgres is faster, when you build and interact with your database properly.

      MySQL is still a toy database, a glorified textfile database. Even if you forget that you need to lock tables everytime you update stuff, slowing down a MySQL db exponentially with every additional user, it's still slower than a genuine rdbms with sp's written in C, inserts and updates aside.

      l8,
      AC
      a postgresql user for over 5 years.

    19. Re:I used to swear by MySQL by Anonymous Coward · · Score: 0

      Nope!
      VIM kicks ass.

  5. register_globals = off by Neil+Watson · · Score: 4, Informative

    I hope line one tells us to always leave register_globals = off. Better yet, I hope PHP5 always runs that way.

    1. Re:register_globals = off by Nos. · · Score: 2, Informative

      Not only that, but for new people,
      magic_quote_gpc = On
      For those not familiar with php, this will escape single quotes in GET/POST/COOKIE data. Helps protect the unfamiliar from things like SQL injection attacks. Once you know what you are doing they can be a bit of a pain in the ass, but for new people, it can help make your code a bit safer.

    2. Re:register_globals = off by Anonymous Coward · · Score: 0

      How's that informative? The parent comment is purely speculative.
      register_globals has been off by default for ages now. Even in PHP4, my dear!

    3. Re:register_globals = off by jdhutchins · · Score: 2, Insightful

      It will prevent those kinds of attacks at the expense of not teaching you how to write around them. It's really very easy to avoid sql injection attacks. magic_quote_gpc also has this "magic" thing, and you don't always want your data escaped. Sometimes, you do happen to do things other than database work with form data.

    4. Re:register_globals = off by Frizzle+Fry · · Score: 1
      register_globals has been off by default for ages now

      He presumably knows that given that his advice was to leave it off.
      --
      I'd rather be lucky than good.
    5. Re:register_globals = off by Anonymous Coward · · Score: 0

      Yes, he said all those things.

    6. Re:register_globals = off by Ford+Prefect · · Score: 4, Funny

      magic_quotes_gpc = On

      Switch the damn thing off. It\'s a bloody annoying hack which may (or may not be) switched on for a particular web host, meaning that for security reasons your code has to check whether it's switched on or off, and massage data accordingly. :-)

      I\'ve got two functions which automatically strip incoming data of any added escaping, because with my form validation stuff the text may either go into an SQL query or back into the form again, with missing fields highlighted. Text might have come out of the database sans escaping, for editing purposes, and I don't want to have to write my forms code to treat data differently depending on its source. If everything\'s plain, unescaped text, it makes things so much simpler...

      A couple of simple rules - firstly, when creating a database query, always (integer )$record_id or '".mysql_escape_string( $input_string )."' all variables in your queries, having previously checked them for sanity.

      Secondly, keep as much code as possible in defined functions, out of the scope of register_globals idiocy. Yes, it can be switched off, but always assume that it's switched on, and is your enemy. Plus, it's a lot easier to track incoming data in your code when it's all defined at the beginning...

      page_record_input( ACTION_EDIT, array_unescape( $_POST['input_record'] ), (integer )$_GET['record_id'] );

      And lastly, always assume that your users are out to get you. Validate all data, and assume everything and everyone is hostile. :-)

      --
      Tedious Bloggy Stuff - hooray?
    7. Re:register_globals = off by humankind · · Score: 1

      This little aspect is one sure way to find out if the guy doing your PHP is competent. There is no reason to use register_globals unless you don't care about security. If you have an application that uses this feature; if you have a subcontractor "needing" this feature, you might want to save yourself some future trouble and dump them.

    8. Re:register_globals = off by runderwo · · Score: 1

      No. Just do the right thing and use addslashes on the input when it is appropriate to do so.

    9. Re:register_globals = off by mdfst13 · · Score: 1

      " This little aspect is one sure way to find out if the guy doing your PHP is competent."

      Yep, if your PHP guy or host tells you that you need to turn register_globals off for security reasons, you know that the twit doesn't know how to code properly. register_globals is only a security problem for badly written code. One reason that applications will use it is because it simplifies PHP3 compatibility for some uses. Of course, there shouldn't be too many PHP3 installs left now, so they should probably phase it out.

      The reason that it (correctly) defaults to off now is that badly written code is quite common. Same thing with magic_quotes_gpc but moreso. It makes it harder to code in vulnerabilities but also makes it harder to process the data. This forces people to research the problem. Once they understand the issues, they can turn off magic_quotes_gpc and code the database insert code properly.

      A surefire sign of a bad hosting company is one that won't allow you to revise these settings for your own site because it compromises "security." If the host can't protect sites from malformed code from other sites on the server, the host is not worth the trouble.

    10. Re:register_globals = off by man_ls · · Score: 1

      All of my code I've used that makes use of register_globals sanity checks everything...strip all codes, tags, slashes, etc. out of every input, and check to make sure the submission comes from a valid established and authenticated session.

      Those things make it pretty good, in my experience.

    11. Re:register_globals = off by Anonymous Coward · · Score: 0

      No, the "right thing" would be to use a real fucking database layer that supports parameter objects as well as refusing to fuck up your code with MySQL-specific hacks.

    12. Re:register_globals = off by humankind · · Score: 2, Informative

      Yep, if your PHP guy or host tells you that you need to turn register_globals off for security reasons, you know that the twit doesn't know how to code properly. register_globals is only a security problem for badly written code.

      Bull. There's no good reason to use register globals unless you don't know how to program secure applications. There's NOTHING that can be done with register_globals on that can't be done with register_globals=off, except expose slacker, lame programmers and lame applications.

    13. Re:register_globals = off by TheRaven64 · · Score: 1

      I think the grandparent was correct. Register_globals really is only a security problem for badly written code. The question is, where to find a programmer who can guarantee that all of their code is well written. I know mine isn't...

      --
      I am TheRaven on Soylent News
    14. Re:register_globals = off by mdfst13 · · Score: 1

      "There's no good reason to use register globals unless you don't know how to program secure applications."

      That is entirely bass ackwards. If you don't know how to program properly, you should have register_globals turned off. If you do know how to code properly, then it doesn't matter if register_globals is off or on. Well written code is inherently immune to exploit of register_globals.

      With the demise of PHP3, there is no reason not to write code that is compatible with register_globals off. However, this does not mean that older code that requires it is poorly written. It just means that it was using the interface that worked with PHP3.

    15. Re:register_globals = off by gfreeman · · Score: 1

      And lastly, always assume that your users are out to get you. Validate all data, and assume everything and everyone is hostile. :-)

      Apart from that validate thing, you'd make a good POTUS.

      --
      Ceci n'est pas un sig.
    16. Re:register_globals = off by humankind · · Score: 1

      That is entirely bass ackwards. If you don't know how to program properly, you should have register_globals turned off. If you do know how to code properly, then it doesn't matter if register_globals is off or on. Well written code is inherently immune to exploit of register_globals.

      There is not a programmer on this planet that consistently writes perfect, secure code.

      Your attitude is analagous to saying, "If you are always watching your front door, there's no reason to lock it." Only a fool uses reasoning like that.

      But feel free to use register_globals on. I'm in favor of it. It makes it that much easier to tell the crappy developers from the quality developers, who don't take anything for granted and recognize that a web environment is ever-changing and every single point of infiltration needs to be closed wherever possible.

  6. About time.... by NightDragon · · Score: 1

    Finally, a >> refrence to php. im sick of paying $50 for those so called "bibles" (i call them doorstops.)

    --
    -ND
  7. It's cheaper at Amazon than at BN by civilengineer · · Score: 5, Informative

    $26.39 at Amazon.com. $31.99 at BN.com

    --

    New year Resolution: Don't change sig this year
    1. Re:It's cheaper at Amazon than at BN by Anonymous Coward · · Score: 0

      Bookpool.com has it for $25.95, although Amazon and Buy.com ($26.59) have free shipping. Looks like Amazon is the best deal if you're only buying one book.

    2. Re:It's cheaper at Amazon than at BN by Screamer49 · · Score: 1

      And even cheaper at bookpool - $25.95

      http://www.bookpool.com/.x/6ibyg4xsc0/sm/189311551 8

    3. Re:It's cheaper at Amazon than at BN by zurab · · Score: 1
      And even cheaper at bookpool - $25.95

      +$2.91 shipping = $28.86. Cheaper at bamm.com with free shipping. $27.99 if you are not a club member, $25.19 if you are. And no, you don't need to accept cookies to order a book.
    4. Re:It's cheaper at Amazon than at BN by hackstraw · · Score: 1

      $26.39 at Amazon.com. $31.99 at BN.com

      Amazon has patents and BN does not, or at least I don't know of them having any and it does not really matter. This was an executive decision at /. a while back.

      Sometimes priciples comes before price, sometimes price comes before principles.

    5. Re:It's cheaper at Amazon than at BN by blackmonday · · Score: 2, Informative

      Never buy a tech book without checking bookpool.com!

      $25.95 + shipping, free ship with $40 order (sadly, most tech books are pricey)

    6. Re:It's cheaper at Amazon than at BN by Anonymous Coward · · Score: 0

      Informative? Hmmm, let's see, I could get it for $26.39 from Amazon or $26.59 from Buy.com with free shipping, or I could pay for shipping and get it for $25.95 at Bookpool.com. I think the choice is obvious...

    7. Re:It's cheaper at Amazon than at BN by Anonymous Coward · · Score: 0

      This was an executive decision at /. a while back.

      And we slashbots think with one mind!

  8. Poor choice of scope? by Jason1729 · · Score: 3, Interesting

    When starting out in a new language, I like a book like the Teach Yourself series which starts out by taking you through installing and setting up environment at a very simple level, and then goes on to examples I can skim through and quickly graduate to a referrence book or the online docs.

    Most referrence books and advanced books assume you already have a working environment and sometimes (think Java) installing and getting everything working is the hardest part.

    Once I'm passed the initial bumps though, I want a book that's aimed at advanced users, mainly because the more "beginner friendly" a book is, the lower the signal-noise ratio in the writing.

    Jason
    ProfQuotes

    1. Re:Poor choice of scope? by DrMorris · · Score: 2, Insightful

      Strange. The chapter about installing the software is the one I always skip. With todays ["user friendly"] installing routines [for popular software] these advices seem to be obsolete for me. Additionaly, if you are installing from the sources, you probably have to read some up-to-date instructions anyhow. So I don't see any reason to print OS-specific, release-dependent details in a book about a software product [for developers].

  9. Books? by jargoone · · Score: 1, Interesting

    Books are so 1980 to me. I know that some people rely on them, but it seems so much easier to me to find what I'm looking for on the web. Just curious: who disagrees with me, and why?

    1. Re:Books? by Nos. · · Score: 3, Insightful

      Honestly? Because I can read a book in the john. I have an old Unix Power Tools book in the basement bathroom, and I'm still learning new command line tricks. I have to admit though, I've skipped the chapter on Emacs.

    2. Re:Books? by Saeed+al-Sahaf · · Score: 3, Insightful

      I tend to go for books for two reasons. First, I'm not tied to my computer, sometimes I go out, ride a bus / train / plane, and like to read a nice fat tech book. Second, I like to have the book open WHILE I'm working on a project, and I don't have two monitors side by side. Oh, and I think I'm able to access the info faster. That's three.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    3. Re:Books? by Kralizec · · Score: 2, Insightful
      I love the Internet for teaching myself something new, there are a few reasons I'm still glad books are around, though:

      1) Sometimes online resources that give a comprehensive overview are hard to come by. The web usually offers more reference-oriented materials

      2) I live in the boonies, and don't have broadband. Searching for information on the Internet is a slow and painful process when you're dealing with 28.8kbps connections.

      3) Sometimes I just get sick of looking at the computer screen.

    4. Re:Books? by thryllkill · · Score: 1

      Of course there are those few books with crappy indexes that cause me to sit and wish there was a ctrl-f option with printed works.

      --

      Note to self: No more arguing with the faithful.

    5. Re:Books? by Anonymous Coward · · Score: 1, Funny

      I have a colleague who put a hinged laptop tray and a LAN jack in his home john.

      An anecdote, NOT an endorsement!!!

    6. Re:Books? by kfg · · Score: 5, Insightful

      . . .it seems so much easier to me to find what I'm looking for on the web.

      What you are looking for is not always what you need to know.

      KFG

    7. Re:Books? by Anonymous Coward · · Score: 0

      I don't disagree entirely. But sometimes I just can't fucking find real information on the net. Stuff that would be in a good electronics textbook, perhaps. Or books of sheet music, for pieces that aren't so well-known.

      Otherwise I am mostly using the internet to find what I need.

    8. Re:Books? by Anonymous+Luddite · · Score: 2, Insightful


      To read enough about any subject to know it in depth, I'll take a book thanks. A lot of days I'm 12 hours in front of the monitors. After a while the screens start to bug my eyes - I find myself printing a lot of stuff just so I can sit back from the desk and read it off a page...

    9. Re:Books? by kanotspell · · Score: 2, Insightful

      disagree...
      I find the web great for getting started on a project and for getting to a more advanced level, but it's that middle ground that a book shines. Most how-to or informational sites just don't have the helpful fluff that a book carries, sure you can assemble the same amount of info from various web sources but a book is just easier.

      Plus there's just something wierd about sitting on the can with a laptop.

    10. Re:Books? by Anonymous Coward · · Score: 0

      I had mod points and I disagreed. I win. (Thus the anonymous post.)

      I like books because I find it easier to read from paper than from a screen. Plus, it lets you open your reference on your desk and still keep your work up on the screen without flitting around.

      I guess it's a little harder to cut and paste from a book, but at least my way forces me to do it at least once.

    11. Re:Books? by Anonymous Coward · · Score: 0

      For pure speed and volume of information, you're right, but I can't get rid of books. The books are easier on my eyes and I can read them more places (tub, car w/ no inverter, in a tree, whatever.)

    12. Re:Books? by kleinishere · · Score: 0

      I tried to figure out PHP and MySQL for about a month and got very little results. I bought one book for $30 and was able to do what I had just done in about a few days. Books offer and ordered and consistent teaching from the beginning to end. Instead of looking at random places you have a great outline and typically strategic guide to your goal with programming. Much more success, in a lot less time!

    13. Re:Books? by Anonymous Coward · · Score: 0

      were you alive in 1980? :)

      just kidding .. seriously, tho .. aside from the
      "give the eyes a rest and look at something that
      isn't bombarding your eyes with light" books are
      easier to navigate in a lot of instances,
      particularly programming reference books. you go
      to the section you want, leave it open on the desk,
      code away

      it boils down to personal preference .. for core
      manuals, i still like my dead trees .. if i want
      up to date information, i'll stick with the web.
      i tend to absorb material better when reading
      from a book .. there is something about the sense
      of immediacy ( perhaps i'm slightly ADD and if
      there is a button i want to push it ) with the
      web that makes it more distracting .. with a book
      your focus isn't drawn to hyperlinks ( footnotes
      and references notwithstanding ) .. and we won't
      mention banner ads ;)

    14. Re:Books? by Anonymous Coward · · Score: 0

      I like to do most of my deep reading and learning while taking a shit.

      If drop my $30 copy of "The Teach Yourself Extreme Test-Driven Development By Example In 28 Days Bible For Dummies, PHP Edition" in the shitter, that's a bummer.

      If I drop my $3000 PowerBook in the shitter, it's gonna be a Bad Day. It's gonna be a Really Bad Day. It's gonna be an Unbelievably Really Bad Day.

    15. Re:Books? by geminidomino · · Score: 1

      We need to get a +1, Zen moderation

    16. Re:Books? by ChrisMaple · · Score: 1
      Portability, durability, permanence (will that web page be there in a year, or am I going to have to save it to disk, and if I do so will the links work?), ability to write in the margins and cross out things I know are wrong.

      The web is a different kind of tool, and important information is occasionally very difficult to find or just not there. Same applies to books.

      --
      Contribute to civilization: ari.aynrand.org/donate
    17. Re:Books? by Anonymous Coward · · Score: 0

      i have a friend who did the same thing (well, at least the LAN jack) and immediately sent me a message saying "dude, i'm taking a shit while talking to you"... kind of made for an odd start to my day...

  10. It's PostgreSQL, please by SuperBanana · · Score: 1
    Postgres is where it is at.

    Postgres was the revision of Ingres; PostgreSQL was Postgres with SQL. Minor oversimplification, but good enough.

    It's been PostgreSQL for years- please call it by its proper name :-)

    1. Re:It's PostgreSQL, please by Anonymous Coward · · Score: 0

      bah .. screw you .. nobody gives a damn about the
      postgres vs. postgresql thing .. uppity wannabe
      techies make me ill.

      go correct someone's grammar in public .. win a
      few more friends ;p

    2. Re:It's PostgreSQL, please by randallman · · Score: 2

      Saying PostgreSQL is like saying supercalafradjalisticexpialadosous. A real pain. Instead, I just say supercal. Plus it just sounds stupid. Postgres sounds nice and is easy to say. But maybe your just talking about how it is written. In that case, I agree.

    3. Re:It's PostgreSQL, please by Anonymous Coward · · Score: 0

      "Postgres was the revision of Ingres; PostgreSQL was Postgres with SQL. Minor oversimplification, but good enough. It's been PostgreSQL for years- please call it by its proper name :-)"

      Postgres it is! I will now make everyone I know call it Postgres and tell every non techie I know that they are using Postgres databases.

    4. Re:It's PostgreSQL, please by AstroDrabb · · Score: 2, Informative
      Saying PostgreSQL is like saying supercalafradjalisticexpialadosous. A real pain.
      It is not hard to say Post-Gres-Q-L. Or if you want to hear it.
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    5. Re:It's PostgreSQL, please by mdfst13 · · Score: 1

      "Postgres it is!"

      I'm going to stick with Mys (MySQL is too long to write out all the time).

    6. Re:It's PostgreSQL, please by hunterx11 · · Score: 1

      In other words, Linux isn't an operating system.

      --
      English is easier said than done.
  11. Why MySQL? create user foo createdb; by temojen · · Score: 4, Insightful

    Creating a postgresql user who has the ability to create databases makes that user a superuser of ALL databases. This makes postgresql tricky to use in a mass virtual hosting environment.

    Also, most web applications are not written to take advantage of features such as stored procedures. This is probably partly because the developers don't understand them, and partly because MySQL is so common already.

    1. Re:Why MySQL? create user foo createdb; by Unordained · · Score: 5, Interesting

      Last I heard, the same sorts of reasons were involved in Firebird (the dbms) not being commonly available from hosting companies -- the admin side of things isn't quite geared toward hundreds of independent DBA's all on the same server and all needing to be kept out of each others' stuff. I'm pretty sure hosting companies would also want to make sure you can't load your own modules (user-defined-functions) out of fear you might load something that crashes a lot, or has nasty side-effects. Stored-procs seem safer though. Then there's managing CPU/memory/disk resources trying to make sure no single user's queries monopolize the server (particularly badly-written queries.)

      From what I've seen, people who use MySQL rarely have a good understanding of even the fundamentals of normalization, joins (all types), the difference between WHERE and HAVING, etc. -- stored procedures, constraints, domains, triggers, etc. are just entirely lost on them. They might start to see some benefits to another server system when they run into the quirks of MySQL (and particularly its data-integrity issues, silent conversions, "transactions", etc.)

      But where's my C++/Firebird book? Or my Java/PostgreSQL book? Or my Cobol/Oracle book? What we really need to figure out is how we can learn from this duo (PHP/MySQL) what makes a good set of language bindings, a good database interface, and in general a good programmer experience. I'm sure we can improve these aspects in other languages, giving ourselves more (good) options.

    2. Re:Why MySQL? create user foo createdb; by aldoman · · Score: 2, Interesting

      mySQL (seems) to have the same limitation. Every virtual host setup I've seen uses a seperate tool for DB creation (which is highly restricted to only create DBs with the username or similar before it).

    3. Re:Why MySQL? create user foo createdb; by Anonymous Coward · · Score: 1, Informative

      I find that most people that talk about constraints generally have no idea how a proper constraint should be constructed. The constraints and attribute types available in SQL are so limited as to almost be worthless.

    4. Re:Why MySQL? create user foo createdb; by waynetv · · Score: 2, Interesting

      From what I've seen, people who use MySQL rarely have a good understanding of even the fundamentals of normalization, joins (all types), the difference between WHERE and HAVING, etc. -- stored procedures, constraints, domains, triggers, etc. are just entirely lost on them. They might start to see some benefits to another server system when they run into the quirks of MySQL (and particularly its data-integrity issues, silent conversions, "transactions", etc.)

      That's funny, I generally find the opposite. Because you don't have triggers (especially), constraints, etc you have to do better with your data normalization. I'm working on a SQL server project right now with little or no normalization but lots of triggers to sort it out. What a mess. You couldn't even do that with MySQL. I won't even get into the ugliness of 1500 stored procedures.

    5. Re:Why MySQL? create user foo createdb; by tzanger · · Score: 2, Insightful

      Why on earth would a vhost user ever need to create databases? You create their db when you create their account, give them control over their db and they can create as many tables as their little heart desires.

      Hell with namespaces it can appear like they have completely separate databases if they really need that illusion.

    6. Re:Why MySQL? create user foo createdb; by discord5 · · Score: 5, Insightful
      Creating a postgresql user who has the ability to create databases makes that user a superuser of ALL databases.

      Not jumping to the defense of postgresql or anything (although I do have to use it quite frequently), by why would want to give a user permission to create a database anyway? Most hosting companies will provide you with one database, and that's it. If you need another one, you pay extra.

      Also, most web applications are not written to take advantage of features such as stored procedures.

      So instead of stuffing their database logic where it belongs they write complicated "sql libraries" that are a pain in the behind, riddled with bugs, and eventually just make your code more complicated.

      I've been involved in a couple of projects where I had to maintain other peoples code, and I've seen bad code, really bad code, and really really bad code when it comes to databases. One project involved a database that was supposed to keep track of visa clearing, and for each step that happened in the clearing process (there were 3 if I remember correctly) a log had to be kept in the database. The original developer had a good table design but the library that did all the logging sucked bad. Somewhere he forgot to mark a 'status' field as false and in certain conditions the shit really hit the fan (read: some customers got billed twice, or too much).

      If he had taken the time to write either stored procedures for that table (over the course of the 3 years I ran that project, the table itself never needed to be altered) his code wouldn't have been such a mess, and the modifications to that project wouldn't have taken so long.

      This is probably partly because the developers don't understand them, and partly because MySQL is so common already.

      Let's not forget the most important factor in webdevelopment projects: cost. Customers want results, and they want them fast and cheap. Having to explain to a customer that you need to design a solid database before you can write a letter of code alone is more than enough excuse for that customer to go to another developer who claims he doesn't spend that much time on his database.

      Even worse, to most customers application development couldn't possibly be more complicated than Visual Basic. Webprogramming can hardly be any more difficult than drawing boxes on your screen and the program you draw those boxes in does most of the work. Explaining to people with that attitude that a solid database design will save them possible problems in the future is like banging your head against a brick wall. The wall doesn't understand what you're trying to do, and you're left with a headache at the end of the day.

    7. Re:Why MySQL? create user foo createdb; by Anonymous Coward · · Score: 0

      The only reason MySQL is more popular than PostgreSQL among application developers is that it has a win32 port. PostgreSQL 8.0 will have a native win32 port for the first time, easing development on windows workstations. I hope by then other database application developers haven't been dumbed down enough to ignore it.

      In answer to your point, you are still thinking in MySQL terms. If you didn't want multiple dba's in the system why not use something advanced like schemas or user groups.

      create user foouser createuser;
      create database foodb with owner foouser;

      Now foouser has control over that one database or more, if you want.

      Now, foouser creates several schemas and users.

      create user user1;
      create user user2;

      create schema sub1;
      create schame sub2;

      grant all privileges on schema sub1 to user1;
      grant all privileges on schema sub2 to user2;

    8. Re:Why MySQL? create user foo createdb; by x3ro · · Score: 1
      Creating a postgresql user who has the ability to create databases makes that user a superuser of ALL databases. This makes postgresql tricky to use in a mass virtual hosting environment.

      I don't see the difficulty. All you'd need to do is to offer a place in a secure web admin area, *outside* of the main database managemenet area, where users can create and delete 'their' databases. That mini-webapp could have authorisation via the root user, but would be limited to doing only that one thing. Then, for normal access (phpPgAdmin/etc or the command line), the user would be authenticated with his/her regular database user.

      As I recall from the last time I had to use Plesk (one of the more common admin web consoles) for a client, that's the way it worked anyway.

      --
      [ UNSIGNED NOT NULL ]
    9. Re:Why MySQL? create user foo createdb; by teh_winch · · Score: 1

      I guess one reason is to get one up on your competitor who only offers one database.

      Also most users are just installing third party software and don't really know what they are doing. If they want to install a CMS and a forum and it's easier to do it with 2 databases they will want to use 2 databases.

    10. Re:Why MySQL? create user foo createdb; by globalar · · Score: 2, Interesting

      "...what makes a good set of language bindings, a good database interface, and in general a good programmer experience."

      Amateurs can get by with minimal investment of time. Demand for simple scripting features like forums has been on the rise for years, but the demand has a low-price point. To meet this demand, a massive supply of low-end webhosting hit the market. Now the amateurs have a lot of ready-to-go PHP scripts to use and dirt-cheap webhosting. They have what they and the majority of the Internet websites can understand and want. Something like market equilbrium I suppose.

      "where's my C++/Firebird book? Or my Java/PostgreSQL book? Or my Cobol/Oracle book?"

      C++ is not even comparably friendly to PHP. No one has heard of Firebird. Java is much more than most people need - same with PostgreSQL. Oracle costs money and most people don't know what Cobol is.

      It's not about being the best. It's about being easy enough, cheap enough, and popular enough.

    11. Re:Why MySQL? create user foo createdb; by tzanger · · Score: 1

      ... Postgres isn't stopping any of that. If you want two databases, pay for 'em and the host will give you two, over which you can have full control.

      I dunno; to me it seems perfectly logical that the only person who can create databases is the "root" of the DB system, just as the only person who can create accounts is someone with root access.

    12. Re:Why MySQL? create user foo createdb; by jlrobins_uncc · · Score: 1

      This is not correct -- postgresql users who can create databases are *not* superusers. Those that can create other users are.

      Regardless, as stated elsewhere, why would the general vhosted account be given either createdb or createuser privs?

      Pre-set 'em up their own database + user account. Maybe even, if they're high dollar, give 'em access to a webapp which could create their own schemas within their database (only superusers can create schemas), and then they could go wild and crazy.

    13. Re:Why MySQL? create user foo createdb; by crossconnects · · Score: 1

      The hosting provider I use allows 5 db's but only Mysql.
      If they offered Pgsql, I would use it, but since they don't, I am taking what is available to me and making the most of it.

      As the old cliche says, when life gives you lemons, make lemonade.

      --
      no big sig
    14. Re:Why MySQL? create user foo createdb; by gophish · · Score: 1

      Sounds like high school

      -no i dont care about karma

    15. Re:Why MySQL? create user foo createdb; by Palarran · · Score: 2, Funny

      Funny, I feel the same way about people who use PHP. They seem to have no concept of variable types, or memory allocation, or anything. *g*

      On the other hand, I only feel like I have a handle on about half of the concepts you mention - care to suggest a good place for me to learn more?

    16. Re:Why MySQL? create user foo createdb; by Unordained · · Score: 1

      [Crap. This is a book now. Sorry.]

      I wish I could suggest something good. As mentioned by someone else, the constraint and type mechanisms offered today in most products are horrendous, treasonous to the concepts they represent. You could read product manuals, but that won't give you a very good theoretical basis. You could read theory, but there are a lot of concepts in today's dbms' that the theoreticians don't address (not interesting, don't care, not useful in their eyes.) You'll have to do a bit of both. Look for the product manuals of the most feature-full databases, but ignore anything related to tuning, options, etc. That should give you a good idea of what sorts of things are made available in today's systems. For theory, read Chris Date, Hugh Darwen, and others (I think Amazon has a good "so you want to..." list somewhere of such books.) They cover the theory of relational operations, of datatypes (particularly in "The Third Manifesto", though I disagree with their proposals concerning type inheritance), and constraints (what they should be, and why.) Most everything you learn about databases applies equally well to programming languages and file systems (the converse is likely true as well.)

      For an example of things gone wrong: there's a thread on-going right now on firebird-support about constraints, about how powerful they should be -- mostly because the more powerful a constraint is, the more likely it is to take a long time to verify after each change. Firebird only looks at modified rows when checking constraints, so checking things like "keep the total positive" become a problem. You can have the check constraint go call a stored procedure which will itself look at the whole table ... but you get the idea, things would be messy. Someone, somewhere, didn't think that "full integrity constraints" were necessary, no matter what the theoreticians said. This is true of all current database systems.

      Most database systems make very odd distinctions between all sorts of very closely related issues -- domains/datatypes are constraints on possible values of a variable/attribute, table/database constraints affect more than that, constraints are just functions that return a boolean-like value, which means they're functions -- and functions tend to be split up in most databases into stored procedures and check constraints (compiled bytecode specific to the database system, using PL/SQL or some variant), user-defined functions (usually a C dynamically loaded library) with mappings into the database (you tell the database where the function is, what to call it, what its parameters are, etc.), and built-in functions (come with server, can't rename, can't replace) ... but tables and variables act just like functions with no parameters, in a sense, so they're related too. Triggers are functions called by events, where typical events are usually defined as before/after update/insert/delete in a table (but the list of possible events is really arbitrary.)

      Also as mentioned in another response, yes, people (at least seem to) abuse the abilities of the database system in terms of stored procedures. It's argued they make it simpler and safer to create client applications -- by using views and stored procedures, you effectively design an entire SDK inside your database, and give client applications access only to see and do what you want, rather than giving them free reign over your tables (or somewhere in-between.) Most complaints with stored procedures center around the difficulty of finding your way through thousands of stored procedures (but the same is true of finding the function you need in any large library like java's or CPAN, etc.) or speed (valid complaint from an admin worried about CPU time, but invalid in the sense that it's not exactly the fault of the stored-procs.) That's part of the recurring "two- vs. three-tier" discussion. Databases (in theory) provide everything you need to put your business/app/whatever logic in a single place. In fact,

  12. Ack! by Nos. · · Score: 2, Informative

    that should be
    magic_quotes_gpc = On
    That's quotes, plural. Sorry for any confusion.

  13. Re:ummm by Anonymous Coward · · Score: 0

    As a well designed functional langague, learning PHP is practically trivial for anyone with basic computer skills.

    Your question is like "shouldn't one be fluent in C before attempting pointers", it's a core element of the language (and the main reason to use PHP), you should learn it while you learn the language.

    I know a lot of pic programmers who started on the F84 (which does nothing in hardware for you), so they bit-bang RS232, do their own PWM, etc. Then when they graduate to more advanced chips, they still do everything the hardware because it's "easier than learning another way to do it".

  14. My PHP reference... by Darth+Maul · · Score: 2, Informative


    http://phpbuilder.net/

    All you need. Includes all the MySQL functions, too.

    --
    --- witty signature
    1. Re:My PHP reference... by dema · · Score: 1

      Includes all the functions, too. Without advertizements.

      And don't forget the comments!

      I've found more useful information and custom functions in the comments than any other php reference website.

  15. Before I get flamed/foed by temojen · · Score: 1

    I should point out that I prefer PostgreSQL.

  16. Re:Anyone recommend c# books/tuts for beginners? by Anonymous Coward · · Score: 1, Informative

    O'Reilly's "Learning C#" by Jesse Liberty really helped me out -- i'm a non-programmer, so this book really spoonfed me the basic concepts.

  17. Re:php & mysql & heady? by Saeed+al-Sahaf · · Score: 1, Funny
    for any real programmer all of php and mysql could be covered in incredible detail in about a 3 page brochure.

    Very tiny letters?

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  18. Stick with PHP 4 by The_Real_Nire · · Score: 5, Interesting

    As an experienced PHP programmer, I'd HIGHLY recommend coders, especially beginners, tick with PHP version 4. I know its tempting to get the 'latest and greatest', however, v5 is still too new, and the majority of servers out there still only support v4 code, so you will run into problems if you already start using functions/methods available in v5 only, and dont own/operate/have root on the server in which your code is going to run, and only ever run.

    I don't plan to make the switch to version 5 for at least 9 months or so, when v5 becomes the true de facto.

    1. Re:Stick with PHP 4 by mgkimsal2 · · Score: 5, Interesting

      This is a great point. I think/hope that PHP5 has a faster adoption rate amongst hosting companies, but it'll still take some time.

      PHP5 *does* make sense for corporate/internal developers, or anyone else writing for a more controlled environment. For average joe, however, widespread PHP5 support is still minimally months off, if not years (I hope not!)

    2. Re:Stick with PHP 4 by Yolegoman · · Score: 1

      Yes, but as a somewhat, shall we say, intermediate programmer, and one who would especially like to learn all about the new OOP enviroments in PHP 5, would you recommend this for practicing with until PHP 5 becomes standard? My webhost is just a college dude who rents a server out monthly and resells it to guys like me. Actually, I became a reseller under him, so I have root access to the server. I'm sure I could convince him to upgrade pretty soon. In the meantime, I'd love to fool with PHP 5 on my own machine. Any thoughts?

    3. Re:Stick with PHP 4 by athakur999 · · Score: 1

      Windows users will definately want to stick with PHP4. The MySQL support in the PHP5 win32 binaries seems to be broken out of the box.

      --
      "People that quote themselves in their signatures bother me" - athakur999
    4. Re:Stick with PHP 4 by mios · · Score: 1

      You're right in some ways, but I'd hate to tell someone to stick to php4 when php5 is so much better.
      1and1.com offers php5 support already ... just spreading the word, I'm sure there are others, but that's what I know for sure. And if you are in control of your own server, you can keep php4 + apache running in the foreground and then ProxyPass to a second apache running on a diff port if you want to start deploying some php5 apps until you are confident you can move everything over to php5.

      2 good refs for that are: http://wiki.coggeshall.org/37.html and http://www.schlitt.info/applications/blog/archives /83_How_to_run_PHP4_and_PHP_5_prallel.html That's what I'm starting to do .. so far, so good.

    5. Re:Stick with PHP 4 by mios · · Score: 1

      Yeah .. you should do it. If you can install your own apache/php5 combo on your box, then why not go for it?

    6. Re:Stick with PHP 4 by The_Real_Nire · · Score: 1

      Not sure I'd agree with php5 being "so much better".
      and just a handful of web hosting companies supporting php5 doesnt make it the defacto as I said.

      Portability is really the key here, and in sticking with php4 code, everyone can save headaches from not knowing why certain (php5 only) functions arent working when they "should be". Which mostly just a function of experience. However php is growing very fast in popularity, and because of that, keeping the code as portable as possible is always the best choice.

      Plus, any php 4 code someone may write, can always be modified later to be php5 compliant, and would be considerably faster and easier than the reverse, since you would be removing self-written functions and using built-ins for the change from 4 to 5

    7. Re:Stick with PHP 4 by The_Real_Nire · · Score: 1

      It doesnt hurt to learn new things, especially in the case of programming languages. I dont disagree with learning php 5, but I dont think you should get too used to it at this point in time.

      If you consider yourself just an intermediate programmer, then I would recommend you put your focus on honing your php 4 skills first, then taking on php 5 will be a cakewalk instead of a chore in itself.

      As far as OOP is concerned, I'd recommend you learn it in php4 as well, since it is also an OO based language.

      In terms of books to look for, I found O'Reilly's PHP CookBook to be the most useful, and most accurate in terms of proper PHP code.

      PHP is a VERY quirky language, and there are a lot of things that you can do wrong, and never know about without really understanding the langauge. (such as using " instead of ' to enclose strings, which causes your scripts to run slower since the php engine has to parse " strings for variables)

      If you want to learn php 5, you first should KNOW php 4, so that you will be able ot tell the differences in the 2 versions, and not confuse yourself.

    8. Re:Stick with PHP 4 by kellan1 · · Score: 1

      I have to disagree. Sure if you're a novice, just banging together a few web pages there are more resources available on PHP4

      Or if you're going to be writing the next Gallery/Wordpress/etc that will be installed on every concievable 2-bit hosting outfit you certainly need to keep PHP4 around for testing. (for reference MagpieRSS [mentioned in the review] required no changes to be compatible with PHP5)

      However if you a programmer with some experience, or you're interested in building a well architected system, and especially if you believe that objects are an essential piece of good software development on medium to large projects you owe it to yourself to start using PHP5

      Objects passed by references versus value is worth the upgrade all by itself.

    9. Re:Stick with PHP 4 by mios · · Score: 1

      Heh .. maybe we agree to disagree .. because I am pretty sure that php5 is "so much better" :-)

      The better object model and the try / catch additions alone are what, to me, really sells it
      I'm not saying that your points are not valid .. they are .. portability is sometimes key .. and yes, if it needs to move and run in many different environments, I guess you might choose php4. If you don't have control of your production environment, then you have to code to what is there, to be sure, but if I'm in control of the environment, and a client is contracting me to build a new system/project for them, I'm going to choose php5 every time now.
      The same argument applies to every other technology. Many hosting providers now still only offer mysql 3.x ... if I choose to use mysql, and I find the project will benefit from the new features in mysql4.x (barring any licensing issues) ... why would I stick with the older version if I can control that? Or if the project will benefit from using postgres ... same argument ... just because you are given something, doesn't mean it's the best thing to use.

      Just my 2 cents ... I guess I'm also taking for granted/assuming that php5 is production ready .. which might be a dumb thing for me to do, and my ass might get burned .. I'll let you know in a few months :-)

    10. Re:Stick with PHP 4 by The_Real_Nire · · Score: 1

      So then what happens is later, that client decides they want to switch the system/code you wrote to a different hosting provider, which doesnt support php 5?

      Have fun with that support call.

      And yes, there are some providers taht still have mysql 3.x, however, mysql 4 is the norm, and on MOST servers, which was my point to begin with.

      And no, I dont think that PHP 5 is production ready yet either, at least I wouldnt take that chance if I was building for paying clients.

    11. Re:Stick with PHP 4 by mios · · Score: 1
      Hah .. yeah, that would be an interesting support call to say the least.
      Truth of the matter is that I don't think that responsibility falls in my lap. A system is built to a certain requirement spec at the time of proposal ... we need x,y,z to be in place and we'll give you a,b,c ... if you decide to move to a place that doesn't support the reqs of the original project, how is this my problem?
      What if we built a java web app and the person sometime down the road wants to switch to a different server/provider that doesn't have java installed/supported? Is that really much different?
      In the course of the past 4 months, we've acquired (or upgraded to their new server offerings) about 4 different root servers from 4 different providers
      • ValueWeb
      • 1and1.com
      • MediaTemple
      • Verio
      None of them have mysql 4 installed ... maybe I've had a run of bad luck :-)
      I'd be interested in what you think makes php5 not production-ready, though. Is it just for the fact that it is a recent release, or have you experienced/heard of some nasties rearing their ugly head?
    12. Re:Stick with PHP 4 by The_Real_Nire · · Score: 1

      Actually, we have a verio blade server also, and it does have mysql 4.

      I understand and agree with your point on the requirements of the specs given at the time of proposal, but typically in the jobs I do, portability is an issue, and therefore part of the spec, so I guess it just depends on the client.

      My opinion on php5 not being production ready has a lot to do with it being a recent release. I know that from a developer standpoint, its very difficult to bug test _everything_, so thats where users, or in this case php developers, come into the picture. There are a lot of compatibility issues that need to be tested as well, such as with apache 1.3 and 2, etc, etc. I havent had any personal expereinces myself, since i have been playing it safe by avoiding it.

  19. My PHP reference... by temojen · · Score: 4, Informative

    All you need.

    Includes all the functions, too. Without advertizements.

  20. Not sure why... by downward+dog · · Score: 3, Insightful

    To an extent, maybe, but it doesn't take that long to become "fluent" enough in PHP to do database work. PHP 5 has pretty nice MySQL and PostgreSQL connection functions that make working with databases relatively simple.

    Learning MySQL and PHP together is actually a great way to go, IMHO. Especially if you have some basic knowledge of C-syntax (C, Java, Javascript, Perl) and database concepts (basic SQL). Each program is only marginally useful without the other, and each can be learned quickly.

  21. Umm... by temojen · · Score: 0

    I think that's why the title starts "Beginning..."

  22. Re:How much does it cost... really? by Anonymous Coward · · Score: 0

    Look at at his profile: http://slashdot.org/~norburym

  23. Re:php & mysql & heady? by apachetoolbox · · Score: 1

    I just took a look at http://www.wacked.org/heller/ , don't think you have any room to talk there. :)

  24. Re:php & mysql & heady? by heller · · Score: 1

    What? you don't agree with the views I express there?

  25. Just Say No by shiflett · · Score: 1

    I disagree. Your suggestion is the way the US education system tends to work - teach kids the easy way first, then teach them the right way later (and explain why the easy way is wrong).

    The magic quotes feature escapes data for use in a query. There are lots of things you can be doing with data, and storing it is just one.

    Also, the escaping that magic quotes does is equivalent to the addslashes function. This is a good last resort, but better options exist for many databases - for example, mysql_escape_string for MySQL.

  26. Re:php & mysql & heady? by Saeed+al-Sahaf · · Score: 1

    "Very tiny letters" implies that there is a lot to say about PHP and MySQL. Why is this a troll?

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  27. Re:php & mysql & heady? by shiflett · · Score: 1

    People with this perspective tend to be very poor programmers - no "real programmer" would assert that a programming language can be "covered in incredible detail in about a 3 page brochure."

  28. Re:ummm by DrMorris · · Score: 3, Informative

    I think the parent posters point was another one:
    PHP is a programming language for "web-things". MySQL is a relational database. These are two separate things. Even if you know how to access a database from a programming language, you do not necessarily know how to design a database. With a badly designed DB and a relatively small amount of data, the advantage of using a DB might mostly be vanished.

  29. For those who wish to buy this book by Pugio · · Score: 4, Informative

    Cheapest price I've found is $23.52 (this includes shipping) from here. Now the question is... PHP or Perl? Which do I choose? (Old debate I know.)

    1. Re:For those who wish to buy this book by Anonymous Coward · · Score: 0

      "...PHP or Perl?..."

      It's up to you. Maybe a deciding factor could be if the Apache server (assuming you don't have control of it) doesn't have mod-perl installed then use PHP. But being more specific with what you are doing would help answer that question.

    2. Re:For those who wish to buy this book by z0ink · · Score: 0

      PHP and Perl are both (primarily) linux based scripting languages. PHP can be deployed on both windows and linux, but Perl (other than microsoft's variant) is still a linux deal. For web development I would suggest PHP as it is easier to get into and understand and with a plethora of support and developers geared towards online applications. Perl is compared to that of Sed/Awk, in that it is built more for file manipulation and the like. The possibilities are limitless with both languages, but I believe unless you are going to be working with just flatfile 100% of the time and want to have a semi-dynamic site (cron job to run perl script every X hours).

      --
      Steal This Sig
    3. Re:For those who wish to buy this book by AGTiny · · Score: 2, Informative

      Perl works fine on Windows, even in IIS. http://www.activestate.com/Products/ActivePerl/

    4. Re:For those who wish to buy this book by Anonymous Coward · · Score: 0

      Perl (other than microsoft's variant) is still a linux deal.

      Microsoft has a variant of Perl? I've been using ActiveState Perl on Windows for ages.

    5. Re:For those who wish to buy this book by onlyjoking · · Score: 1

      Prolly referring to PerlScript, the bastard offspring of the venerable pachyderm which lives inside ASP. Rather than the usual Embrace And Extend this seems more like Billy G's attempt to castrate the Camel.

    6. Re:For those who wish to buy this book by Anonymous Coward · · Score: 0

      Why argue over "Coke or Pepsi" when you can try a fine wine?

      And you can do web development faster than you ever thought possible. just watch.

  30. Re:php & mysql & heady? by heller · · Score: 1

    ever seen logo?

  31. PHP and MySQL are "heady"? by euxneks · · Score: 1

    PHP and MySQL are "heady"? What sort of head do you have?

    --
    in girum imus nocte et consumimur igni
    1. Re:PHP and MySQL are "heady"? by OneFootIn · · Score: 1

      PHP and MySQL are "heady"? What sort of head do you have?

      I believe the "H" in "PHP" stands for "hydrocephaly."

  32. Comment removed by account_deleted · · Score: 2, Informative

    Comment removed based on user account deletion

  33. PHP4 vs. PHP5 by downward+dog · · Score: 1

    Any reason to stick with PHP4 other than hosting compatibility?

    1. Re:PHP4 vs. PHP5 by ahdeoz · · Score: 1

      Documentation, libraries, stability, experience. Oh, and PHP5 is a very different language than PHP3 & 4. There are some advatages and some built in libraries that make PHP5 desirable, but not enough to risk the change... yet. Next year I'll start learning and evaluating PHP5. But it'll probably be 2006 before we bother to even attempt it in a real environment. Who knows, maybe Apache 2 will be ready by then?

  34. You'll pay less at BookPool.com by n0tWorthy · · Score: 1
    --
    "Be kind, for everyone you meet is facing a great battle." - Philo of Alexandria -
  35. Cheers for the review :) by Bongoots · · Score: 1

    I'd actually just bought the book yesterday, because I'd seen another review (Linux Format magazine, UK) and Norbury-Glaser's review just reinforces how good a book this really is.

    I can't wait to sink my teeth into it late at night, burning the midnight oil :D

    I've just checked Amazon's UK price and I paid the RRP of 25 quid, instead of 17.50 :( .. but I bet that once I finish the book, it'll be worth every single penny I paid for it - no matter what price that was! ;)

  36. If someone said..... by zogger · · Score: 1

    .... "PostgreSQL" to me really fast, I'd probably say "Geshundheit"......

  37. Why? Dear lord, why? by glwtta · · Score: 0, Redundant
    Quick search on Amazon for "php and mysql": 554 results.

    Why on earth do we need another PHP + MySQL book coming out every two weeks? None of this stuff is complicated - PHP is about as simple as a scripting language can get, MySQL is simplistic to the point of being frequently useless; and even the more general field of web application development (which these books rarely go into with any depth) is not all that involved, in the grand scheme of things.

    So, why? Why do we need more of these things? Are the five hundred existing books really so crap that they are not enough to learn the arcane arts of PHP and MySQL?

    --
    sic transit gloria mundi
    1. Re:Why? Dear lord, why? by Anonymous Coward · · Score: 0

      I don't think i ever read one except when i sorta shrugged through the regex on a library book, copied it out for notes and stuffed it back.. 500 books are a waste unless they are all on PPC64 assembly (which is more shiny than x86 cause i said so).

    2. Re:Why? Dear lord, why? by ScytheBlade1 · · Score: 2, Insightful

      More importantley: how about we get a DECENT beginners book? Correction, how about we just drop all beginners books completly?

      This is going to be modded troll, I can just feel it - but I stand firmly behind that. I do a *lot* of PHP development - and I can't count the times that I see this "cool script" out there that does this "awesome thing". Then, I take a look at it, the entire thing is a hack job, and it's labeled "Joe's First Script".

      We don't need beginners books, we need more experienced PHP devs in the first place, and a beginner's book is only going to maul the already horrible ratio of those "know PHP", and those who can actually use it, correctly.

      (That quite obviously came off strong, but I am sick and tired of people who have made money doing PHP, coming to me and asking me why they've got a parse error on line 15, yet line 15 consists of "print('hihi.');" )

    3. Re:Why? Dear lord, why? by Anonymous Coward · · Score: 0

      >> a parse error on line 15, yet line 15 consists of >>"print('hihi.');" )

      Obviously, the problem is those double quotation marks at the beginning and end of this statement...?! ;-)

    4. Re:Why? Dear lord, why? by glwtta · · Score: 2, Insightful
      the already horrible ratio of those "know PHP", and those who can actually use it, correctly.

      I'd guess that this ratio is further hampered by the tendency of people who can "use it correctly" to move on to, well, real programming languages.

      For whatever reason, PHP just tends to not be as sexy anymore once you know what you are doing.

      --
      sic transit gloria mundi
  38. Re:Books? And associated problems by diver5253 · · Score: 1
    I admit it - I do still rely on books for stuff I want to absorb in detail. Problem is, I am beginning to find it hard to 'think' properly when looking at a book. I have to be sitting in front of a screen. It's a bit like not being able to get the thought processes going so easily when staring at a bit of paper - I have to have my hands on a keyboard.

    Anyone else know what I mean?

    So going to the can and hoping to achieve useful work is a bit of a problem - I have to take a laptop and a book...

  39. book reviews overly positive? by discord5 · · Score: 2, Interesting

    I'm wondering if there ever was a book review on slashdot that had as a title "Don't buy this, stay clear, vaporware". I know that the general intention of book reviews is to recommend good books to others, but what about the really bad ones? Not the obvious bad ones like "Teach yourself linux in 25 minutes" or "Cooking with Penguins".

    It's just that I've never seen someone say something negative in the first paragraph of the article. It just seems like authors registered a slashdot account and started promoting their book

    1. Re:book reviews overly positive? by onlyjoking · · Score: 1

      I have to say I thought this particular review sounded more like publisher hype than the average Slashdot review. Where was the numerical rating, for example, or the Good/Bad weighting at the end?

  40. Re:Books? And associated problems by HazE_nMe · · Score: 1

    I know exactly what you mean. I find that if I have to read a short story for my writing class, rather than read the pages the teacher assigns, I find it on the web and it seems to be much easier to read and understand even though it is the exact same text. I think I just don't have good lighting at my desk so the monitor actually helps my eyes.

  41. Problems while reading the book. by Mr_Icon · · Score: 4, Funny

    Something I've noticed: if you flip the pages too fast, they all become blank with the only message showing:

    Warning: mysql_connect(): Too many connections in /usr/hand/book.php on line 4431.

    --
    If you open yourself to the foo, You and foo become one.
  42. IIRC by Phil+John · · Score: 0, Redundant

    all you have to do is enter your smtp server in the php.ini file and you can send mail fine. Personally, I use phpmailer as it gives you lots more features.

    --
    I am NaN
    1. Re:IIRC by mdfst13 · · Score: 1

      " all you have to do is enter your smtp server"

      You need an SMTP server first... MS Windows does not come with one by default. Almost every version of *n?x has sendmail or equivalent.

  43. Re:Don't count your hits before they match by enilnomi · · Score: 3, Funny

    Ah yes; 500 PHP and MySQL books...the two I found most valuable were "Spain for Dummies" and "Zen Vegetarian Cooking."

    500 seemed an excessive number to me as well, so I took the unorthodox step of actually checking the hits. Of the 301 hits I got when searching Amazon "books" for "php and mysql" there were about 30 titles actually written on the topic of php and mysql; another 30 or so were concerned with Dreamweaver MX and Macromedia MX; perhaps 30 were about web design or MacOSX or optimizing for search engines or .net...the rest were all Dummies books, ranging from GRE prep to DisneyWorld.

    Here's a URL for future reference; it's the #1 hit out of 4229 for "Amazon for Dummies".

    S2
    --
    education is no substitute for intelligence
  44. Re: +5 Lamer by Anonymous Coward · · Score: 0
    When starting out in a new language, I like a book like the Teach Yourself series which starts out by taking you through installing and setting up environment at a very simple level

    Right, especially since your e-mail address is jason.lyndhurst@samspublishing.com, right? Nice try, though.

  45. PostgreSQL by Anonymous Coward · · Score: 0

    Why doesn't someone write a pgsql/php book, just because the php folks chose to make mysql a default, doesn't mean that mysql is 1) good 2) even desired.

  46. And even cheaper at books-a-million by A+nonymous+Coward · · Score: 1

    $25.19 including free shipping for orders over $25. Trick is to pay $10 to be a member and get the extra discount.

  47. MOD PARENT DOWN by A+nonymous+Coward · · Score: 1

    It's mine and I replied to the wrong post without reading properly and really really should have just left it alone. I like books-a-million, good prices and good site.

  48. Any reccomendations? by fawlty154 · · Score: 1

    Does anyone have any reccomendations on a good online reference to learn PHP aimed at proficient programmers? I have a lot of experience in general coding (C, C++, Java, etc) as well as server side programming, in most languages except PHP. (ASP, coldfusion, lasso) I'm curious if there is somewhere online that can get me up and running in a shorter timeframe, a resource that doesn't have to explain to me what a for loop is and why I should use it. Thanks

    1. Re:Any reccomendations? by Anonymous Coward · · Score: 0

      I'm a C++ coder myself, and learned PHP solely from the official documentation on www.php.net

    2. Re:Any reccomendations? by rjshields · · Score: 1

      php.net was a comprehensive reference last time I looked. The readme included with the binaries will get you up and running in no time.

      If this book is any thing like Welling and Thompson PHP and MySql Web Development, appealing to the lowest common denominator will make it a tedious read for experienced programmers.

      --
      In this world nothing is certain but death, taxes and flawed car analogies.
  49. Case in point: osCommerce by onlyjoking · · Score: 1

    I can't count the times that I see this "cool script" out there that does this "awesome thing". Then, I take a look at it, the entire thing is a hack job,

    Case in point. This cool, much reviewed open source e-commerce app:

    http://www.oscommerce.com/

    ... depends on having register_globals turned on. After all the publicity surrounding this security liability!

  50. good book by chrisranjana.com · · Score: 0

    Yes a good book on php/mysql is the need of the hour

    --
    Chris ,
    Php Programmers.
  51. Re:ummm by TheRaven64 · · Score: 1
    As a well designed functional langague, learning PHP is practically trivial for anyone with basic computer skills.

    Umm, PHP isn't a functional language, it's an imperative language and optionally a procedural or object oriented language.

    --
    I am TheRaven on Soylent News
  52. Re:It's cheaper here by crossconnects · · Score: 1

    only slightly if your are a member at bn, and i can pick it up locally and save shipping

    --
    no big sig
  53. More cheap/free hosting available for PHP by walterbyrd · · Score: 1

    From what I've seen. I also find PHP more readable. I think Perl has better pattern matching and string handling.

    Just my $0.02. I'm not an expert in either.

  54. Re:Don't count your hits before they match by glwtta · · Score: 1

    30 books is far more than there is to say about PHP and MySQL.

    --
    sic transit gloria mundi
  55. Re:Anyone recommend c# books/tuts for beginners? by rjshields · · Score: 1

    I hope that book is better than his dreadful Teach Yourself C++ in 10 minutes, which really put me off the author.

    --
    In this world nothing is certain but death, taxes and flawed car analogies.
  56. Not to nitpick..... by p.rican · · Score: 1
    The figure of the OSI model in class1.pdf is incorrect. The session layer and presentation layer are reversed. Should be:
    Application
    Presentation
    Session
    Transport
    Net work
    Data Link
    Physical
    --

    /. --"Demented and sad....but social" -Judd Nelson

  57. Re:Help by Saeed+al-Sahaf · · Score: 1

    No, I don't think a knowledge of PHP will help you with blinking colors and Clippy, for that you will need to learn ASP. But learning PHP might just help you learn more about OOP and good programming without all the bells and whistles of Java that keep you from cutting you throat. It's a powerful language in the right hands, and powerfully ugly in the wrong hands.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  58. Finally! by Qbertino · · Score: 2, Funny

    Finally someone writes a book on PHP and MySQL. And it's even a newbie book on PHP and MySQL! Now I can get to learn this high-end stuff. Crickey, that's so cool.
    BTW: I actually plan do do something really cool: I wanna write a Web-CMS in PHP and MySQL. How does that sound, hmm?

    --
    We suffer more in our imagination than in reality. - Seneca
  59. Re:Anyone recommend c# books/tuts for beginners? by llamaluvr · · Score: 1

    Computing with C# by Art Gittleman is a hoss...I'm a teaching assistant in an intro class that uses it, and it's solid.

    --
    Insightful: 76, Off-Topic: 379, Flamebait: 24, Funny: 152, Interesting: 201, Underrated: 55, Troll: 9, Total: 896
  60. multiple configurations per virtual domain? by nighty5 · · Score: 1

    At the moment im writing a fairly lengthy PHP app and will probably co-host it somewhere in the next 6 months.

    My concerns like most savvy developers will have security on their minds at all times. I don't want to rely on the ISP's config, and if they want to change something that might seem insigificant, but at the same puts my app in danger of falling over or exposing some security weakness.

    So, I was wondering if its yet possible to have multiple php.ini files for each virtual domain under apache? If not, do you know if anybody is working on it?

  61. I used to swear at hoplophobes by Anonymous Coward · · Score: 0
    Now I just ask them "What part of subordinate clause" don't you understand?

    Really, now. Most people understand this by middle school.