Hi Frank,

the basic idea of PHP was to create a powerfull and easy to use Language, not 
only for data handling.
Data handlng is one of many facets of PHP.

One developer uses PHP for data handling, the other for rendering HTML 
templates.
One uses it for creating a webservice, the other for doing complex calculations.

If you want a easy data handling, use PDO (how Stephen sad) or use Symfony2 or 
ZF2, aka a framework, for easy data handling.

Regards

Peter Prochaska




Am 27.10.2015 um 16:17 schrieb Stephen Coakley <m...@stephencoakley.com>:

> On 10/26/2015 05:09 AM, Frank Meier wrote:
>> Hi to all of you,
>> 
>> first I want to apologize for may bad English,
>> 
>> .. . .
>> 
>> 
>> I write because I feel that that the way how you see your own product PHP
>> is totally wrong. I do not mean with it that the construction of the
>> language is wrong.
> 
> Ah, OK. So you're the expert then. PHP is open-source; maybe you'd like to 
> contribute to make it better?
> 
>> Your basic aproach is wrong.
>> 
>> PHP is a server side programming language. That means that the most work
>> what PHP have to do is to be the boss of the data servers and handle the
>> data.
> 
> I mean, that's the primary environment PHP is used in, but it can be used for 
> anything really. Straight from the PHP.net homepage:
> 
> > "PHP is a popular general-purpose scripting language that is especially 
> > suited to web development."
> 
>> Create database or tables  or records,  edit,  delete and read and write
>> them.
>> 
>> And where is your fantastic programming language so incredible lousy that
>> me, I am since 35 years a database programmer, just shake my head???
>> 
>> Exact in this operations!!!
>> 
>> I know that it is for free and I can not tell you how much I value your
>> work on it, but  all of you, WAKE UP!!!!
> 
> Your tone of voice is a little comically inappropriate, and it doesn't sound 
> like you value our work. :)
> 
>> You sent the handling of records from modern handling via recordsets back
>> to computer stone age. It is a  torture to use PHP without tools (and they
>> are lousy too) for database operations.
> 
> As already mentioned, try PDO (http://php.net/manual/en/book.pdo.php) -- its 
> built-in and is just as easy to use as ADO.
> 
> If you want to actually use ADO in PHP, you can do that too with COM 
> (http://php.net/manual/en/class.com.php). I'd recommend PDO though; its 
> efficient and easy to use.
> 
>> I can give you a example:
>> 
>> It is in PHP a lot of work to just read the next record in a table.
>> 
>> With ADO is it just nextrecord().
>> 
>> The PHP  way is a insult to the modern world of programming.
> 
> Uh, wait. Where's the PHP example that is "a insult to the modern world of 
> programming"? You didn't actually give an example for PHP...
> 
> Let me help you out.
> 
> ADO (note I could be doing this wrong...):
>    SqlCommand query = new SqlCommand("SELECT * FROM Foo", dbConnection);
>    dbConnection.Open();
>    SqlDataReader reader = query.ExecuteReader();
> 
>    if (reader.HasRows)
>    {
>        while (reader.Read())
>        {
>            Console.WriteLine("{0}", reader.GetString(0));
>        }
>    }
>    else
>    {
>        Console.WriteLine("No rows found.");
>    }
>    reader.Close();
> 
> PDO:
>    $statement = $dbConnection->query("SELECT * FROM Foo");
> 
>    if ($statement->rowCount() > 0) {
>        while ($row = $statement->fetch()) {
>            print $row[0] . "\n";
>        }
>    } else {
>        print "No rows found.\n";
>    }
> 
>> Maybe you should consider to write internal  functions for the record
>> handling which do take all the sql waste of time away  from the programmer
>> and create just short command words that the developer can use them.
>> 
>> This would be a "small step  for you but a  huge leap for mankind!".
>> 
>> And you would finally win the race  in the language battle.
> 
> Not to brag, but we already did. Some of the biggest websites like Wikipedia, 
> use PHP.
> 
>> I am sorry that I write it so harsh, but PHP is for me the definition of
>> server data handling and exact there you fail in a big way.
> 
> I'm not sure what your evidence is for that, but thanks for the laughs.
> 
>> All the programmers around the world reinvent every time the wheel new?
>> 
>> Have this really to be?
>> 
>> In my opinion should exist  commands like:
>> recordnew(table)
>> recordread(id, table)
>> recordwrite(id, table)
>> recorddelete(id, table)
>> recordprev(currentrecord, table)
>> recordnext(currentrecord, table)
>> 
>> This is the minimum what I expect from a program language in the year 2015.
> 
> No object-oriented programming, iterators, or abstraction, in the year 2015? 
> Interesting opinion.
> 
>> This should include already the ajax handling and all the other actions
>> that are needed to get or view or write the data.
> 
> AJAX handling is totally irrelevant here. Not sure what it has to do with DB 
> access,
> 
>> It should also be included table locking and record locking, if needed.
>> 
>> And special  commands for reading multiple records for paginations.
>> And also for a easy  way to edit a record in this paginations set (page,
>> count) and write this  back to the MySQL database or whatever database is
>> used.
>> 
>> .. . .
>> 
>> You are so focused to make PHP better and better that you just forgot to
>> upgrade the basic commands.
>> 
>> A programmer in the year 2015 should not need to  fetch records and do this
>> with program code line by line. This was in the year 1982 the case
> 
> Is the program just supposed to "guess" how you want to handle the data? 
> That's not programming...
> 
>> .. . .
>> 
>> It reminds me on hotels which always renovate the lobby but never the rooms
>> for the guests.
>> 
>> .. . .
>> 
>> I am  sorry  to be so critical,  but this was cooking me since long time.
>> 
>> I am database programmer  for international police organizations.
>> 
>> Please keep my name confident.
>> 
>> 
>>> 
>>> Frank Liebl, GER
>>> KTTL - Royal Thai Police
>>> Federal Police, Headquarters
>>> Bangkok 10330, Phatumwan
>>> T H A I L A N D
>>> Phone: +66 90 243 7837
>>> Email: franky...@gmail.com
>>> Line: scoobeedo
>>> Facebook: scoobeedo cool
>>> Web: www.scoobeedo.com
>>> 
>> 
> 
> Also, you posted your name on this public mailing list so it is no longer 
> confidential: http://news.php.net/php.internals/88937. We keep all 
> communication here public for reference and integrity.
> 
> Thanks for your complaints. It brightened my day. Good luck with programming! 
> Feel free to ask for some help in ##php on Freenode IRC or in the php.general 
> mailing list. :)
> 
> -- 
> Stephen
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Reply via email to