Reply to Re: A "decent database", was Updating the SQL key value

Your name:

Reply:


Posted by Jerry Stuckle on 04/03/07 19:57

Erwin Moller wrote:
> Jerry Stuckle wrote:
>
>> bill wrote:
>>> Toby A Inkster wrote:
>>>> bill wrote:
>>>>
>>>>> I am stuck using 4.x because my hosting company does not have PHP5
>>>>> available, yet.
>>>>> What would be the php 4 code ?
>>>> I'm not really familiar with the MySQL functions in PHP, because I use a
>>>> decent database; and it's been a while since I upgraded away from PHP 4,
>>>> but it should be something like this:
>>>>
>>>> <?php
>>>> $db = mysql_connect(/* connection settings */);
>>>> mysql_select_db($db, 'some_database');
>>>> mysql_query($db, "ALTER TABLE foobar ADD tempcol integer;");
>>>> $count = 0;
>>>> $rs = mysql_query($db, "SELECT order FROM foobar ORDER BY order;");
>>>> while ($row = mysql_fetch_array($rs))
>>>> {
>>>> $count+=10;
>>>> mysql_query($db, sprintf("UPDATE foobar SET tempcol=%d WHERE
>>>> order=%d;"
>>>> $count, $row['order']));
>>>> }
>>>> mysql_query($db, "UPDATE foobar SET order=tempcol;");
>>>> mysql_query($db, "ALTER TABLE foobar DROP tempcol;");
>>>> unset($count, $rs);
>>>> ?>
>>>>
>>> Many thanks - maybe I'll be able to use a "decent database".
>>> I have use DataFlex for many years and am transitioning to SQL and PHP.
>>> This is the first time that I have used a remote server.
>>>
>>> what is a decent database to use with PHP, and why ?
>>> bill
>> MySQL is a perfectly good database for use with PHP. It doesn't have
>> every bell and whistle some other databases have - but it's free, open
>> source and widely supported by hosting companies (more than any other
>> database).
>>
>> It's just that some Postgres users are biased.
>
> Hey Jerry, watch it!
> Postgres users are NOT biased, they just use the best Open Source DB around,
> and they know it.
>
> I am developing an app now. I had to use MySQL because the ISP had no real
> database around.
> I got so darn sick of it, I HAD to switch to Postgres, which was luckily an
> option (after some talk and another ISP).
>
> That is not just a personal opinion, I see a LOT of people coming from
> Postgres having serious trouble with MySQL and its infantile support for
> <you name it>.
>
> In my humble opinion, MySQL is raising a whole generation of DB-users who
> only heard of Foreign Keys and boring stuff like 'database integrity'
> during college at best, since mySQL has no idea what all that means.
> Unless of course you go through the trouble of upgrading that piece of crap
> and use INNODB, then MySQL starts behaving like a database should.
>
> I always wondered: Do the builders of mysql know what the 'relational' in
> 'relational database' actually means?
>
> MySQL is bad, bad, bad.
>
>> But if you want a *good* database, I wouldn't even consider Postgres.
>
> I would.
>
>> I'd go straight to DB2, Oracle or SQL Server. Of course, they'll cost
>> you a few thousand dollars...
>
> Yes, true. I used Oracle (a little) and a lot of M$ SQL Server. Both are
> really good.
>
> Sorry for the rant.
> I am just fed up with MySQL.
>
> Regards,
> Erwin Moller

Erwin,

Yes, I've used Postgres in the past also, and it's a decent database.
But so is MySQL. I have no problem using InnoDB tables - they work
fine, and no "upgrade" necessary - just specify you want to use InnoDB
when you create the table (or alter it later).

And I've use Oracle, SQL Server and DB2 in the past. All are excellent,
albeit expensive, databases. Neither PostGres nor MySQL hold a candle
to any of them.

But MySQL is still the most popular DB around, and there are tons of
applications out there which only use MySQL - for good reason. Because
it is good.

No, it doesn't have all the bells and whistles of PostGres. But many
web applications don't need them. And for those which do, MySQL is
rapidly catching up.

I'm not against PostGres. But I recommend to my customers MySQL because
it is popular, it is well supported, and it is installed on the majority
of the hosting services around.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация