Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Simon Slavin

On 22 Feb 2013, at 9:35pm, Didier Morandi  wrote:

> As far as I understood, SQLite 3 only understands PDO (as I'm
> implementing a program in PHP.) This is why I talked about OOP. I
> thought everyone knew that OOP means Object Oriented Programming and
> PDO is the OOP way of programming with PHP.

There are three ways of handling SQLite databases in PHP.  One of them isn't 
used any more.  The other two are based around OOP ideas because SQLite is 
based around OOP ideas.

One of them is used via PDO and you need to make little changes to your code no 
matter whether you're using SQLite3 or MySQL or some other SQL engine.  The 
advantage of this one is fast switching between using different SQL engines.  
The disadvantage is that some problems are very difficult to diagnose because 
the PDO calls aren't ideally suited to how any one particular SQL engine works.

The other is just a very thin shim which allows you to call the SQLite3 library 
directly from PHP. The advantage of this one is that you can use almost all the 
SQLite3 API and the documentation for SQLite3 is perfectly useful in getting 
your PHP code working, with all errors reported exactly the way the 
documentation says they are.  The disadvantage is that if you switch from 
SQLite3 to another database engine you have to rewrite every database call in 
your code.

But in both cases apart from the actual call which interacts with SQLite, you 
can write the rest of your program procedurally.  So if you don't like OOP 
techniques then apart from the line of your program which invokes a SQLite3 
method you can write the rest of your program completely ignoring OOP ideas.  
In fact many of the examples in the PHP documentation show people doing it that 
way.

So please don't be scared off of using SQLite3 just because it's OOP.  Apart 
from slavishly following that weird arrow syntax for the SQLite calls, you 
don't have to worry about it.  And the PHP documentation includes many examples 
for each call, letting you easily copy stuff without having to understand it 
too well.  In fact that's exactly how I got my own PHP coding done before I 
learned how PHP OOP worked under the covers.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Richard Hipp
On Fri, Feb 22, 2013 at 4:47 PM, Gregory Moore wrote:

> It was my understanding that any version of SQLite is written using the C
> programming language which happens to be a procedural language (as in not
> OOP) so I'm not sure why OOP is even part of the discussion.
>

OOP is a design philosophy, not a programming langauge.  SQLite is OOP even
though it is coded in C.  There are objects (sqlite3, sqlite3_stmt,
sqlite3_vfs, etc) and methods on those objects.  And there is inheritance.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Gregory Moore
It was my understanding that any version of SQLite is written using the C 
programming language which happens to be a procedural language (as in not OOP) 
so I'm not sure why OOP is even part of the discussion.

Or maybe I just need to be educated further. :-)

Greg Moore
thewatchful...@gmail.com

On Feb 22, 2013, at 3:35 PM, Didier Morandi  wrote:

> Ladies and Gentlemen,
> 
> As far as I understood, SQLite 3 only understands PDO (as I'm
> implementing a program in PHP.) This is why I talked about OOP. I
> thought everyone knew that OOP means Object Oriented Programming and
> PDO is the OOP way of programming with PHP.
> Anyway, I do not wish to spam this list with my considerations on all this.
> Sorry for the noise, good bye and thank you for all the fish.
> D.
> 
> 2013/2/22 Petite Abeille :
>> 
>> You seem to be missing the point entirely.  No one mentioned anything about 
>> OOP at all, whatever that is. Merely that you may be better off using a more 
>> contemporary version of SQLite. That's all.
> 
> 2013/2/22 Tim Streater :
> you don't need to do anything OOP in PHP in order to use SQLite. I do
> a bit of OOP here and there but by and large not.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Didier Morandi
Ladies and Gentlemen,

As far as I understood, SQLite 3 only understands PDO (as I'm
implementing a program in PHP.) This is why I talked about OOP. I
thought everyone knew that OOP means Object Oriented Programming and
PDO is the OOP way of programming with PHP.
Anyway, I do not wish to spam this list with my considerations on all this.
Sorry for the noise, good bye and thank you for all the fish.
D.

2013/2/22 Petite Abeille :
>
> You seem to be missing the point entirely.  No one mentioned anything about 
> OOP at all, whatever that is. Merely that you may be better off using a more 
> contemporary version of SQLite. That's all.

2013/2/22 Tim Streater :
>
you don't need to do anything OOP in PHP in order to use SQLite. I do
a bit of OOP here and there but by and large not.
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Tim Streater
On 22 Feb 2013 at 20:51, Didier Morandi  wrote: 

> very reason why noone (but Geeks) will ever move from VBScript to
> PowerShell. Richard, I will not start learning OOP at 62 to be able to
> use SQLite. Sorry for that. I'll stick to MySQL and good old
> procedural PHP.

Not only do you not need to install anything at all on your Mac in order to use 
SQLite/PHP/apache/ajax, but you don't need to do anything OOP in PHP in order 
to use SQLite. I do a bit of OOP here and there but by and large not.



--
Cheers  --  Tim (older than you are)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Petite Abeille

On Feb 22, 2013, at 9:51 PM, Didier Morandi  wrote:

> .

You seem to be missing the point entirely.  No one mentioned anything about OOP 
at all, whatever that is. Merely that you may be better off using a more 
contemporary version of SQLite. That's all.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Didier Morandi
did not know that.
Thanks.

2013/2/22 Simon Slavin :
>
> On 22 Feb 2013, at 7:41pm, Didier Morandi  wrote:
>
>> I then installed MAMP on my Mac
>
> Why ?  OS X includes Apache which includes PHP which includes the sqlite3 
> library.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Didier Morandi
Richard,

I understand your position, the new version is aged 6 years already,
there is obiously no reason to support the previous one. But everyone
should understand that OOP is not a necessity in IT life. I know *a
lot* of people who hate OOP just because it is not the way a computer
works. A computer is a machine driven by a program. A program is a
list of operations. A program is a procedural way of telling a machine
what it has to do. One day, some Geeks around invented OOP. Why ? We
will probably never know. But to me OOP is abnormal. A file or a drive
does not have "methods" and "instances" and such. A file or a drive is
opened, read from, written to and closed. Period. A lot could be
written on the mind of the Folks who invented OOP. Ada was a REAL
progress because the objective was to produce error free code. OOP is
like .NET. An awful counternature invention for Geeks. This is the
very reason why noone (but Geeks) will ever move from VBScript to
PowerShell. Richard, I will not start learning OOP at 62 to be able to
use SQLite. Sorry for that. I'll stick to MySQL and good old
procedural PHP.
.

Didier


2013/2/22 Richard Hipp :

>
> The following link shows the development history of SQLite2.  Pay close
> attention to the dates.
>
>  http://www.sqlite.org/src/timeline?n=200=version_2
>
> Compare with SQLite3:
>
>  http://www.sqlite.org/src/timeline?n=200
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Simon Slavin

On 22 Feb 2013, at 7:41pm, Didier Morandi  wrote:

> I then installed MAMP on my Mac, but the PHP 5.4.10 distributed with
> MAMP doesn't have the SQLite params required in its php.ini

Why ?  OS X includes Apache which includes PHP which includes the sqlite3 
library.  Unless you're using a really old version of OS X.  Just use the 
built-in web service for the Mac.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Stephen Chrzanowski
SQLite 2.x shouldn't be used.  Its old, and I'm not even sure its in
'maintenance mode' anymore.

The PHP version you've installed via WAMP includes the libraries for SQLite
2.x but PROBABLY not for SQLite 3.x by default.  You'll need to install the
packages.  http://php.net/manual/en/book.sqlite3.php

I don't have a Mac (Wife does, but I get ill when I even look at it... ...
fortunately she doesn't read this particular mailing list.  Not to mention
I kind of like sleeping in a bed by allowing it on MY network. ;) ) but I
suspect that either SQLite is completely REMOVED from the MAMP version, or,
its using SQLite 3 which would probably require your getting into a bit of
OOP and using PDO.  PDO isn't a different beast from what PHP4 defaulted
with, but, it is with different mechanisms to get it working.

On Fri, Feb 22, 2013 at 2:41 PM, Didier Morandi wrote:

> Hello Friends,
>
> A new SQLite Chap in the Team, here.
> I successfully installed on my PC/Windoz WAMP and SQLite 2.8.x (I do
> not know anything about PDO...) and built my first appli. Works fine,
> thanks.
> I then installed MAMP on my Mac, but the PHP 5.4.10 distributed with
> MAMP doesn't have the SQLite params required in its php.ini
>
> Why ?
> What should I do to have SQLite 2.8.x work as fine on my Mac as it
> does on my PC ?
>
> (please, don't tell me to go SQLite 3 :-)
>
> Thanks.
>
> Didier
> Toulouse, France
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Richard Hipp
On Fri, Feb 22, 2013 at 2:41 PM, Didier Morandi wrote:

> Hello Friends,
>
> A new SQLite Chap in the Team, here.
> I successfully installed on my PC/Windoz WAMP and SQLite 2.8.x (I do
> not know anything about PDO...) and built my first appli. Works fine,
> thanks.
> I then installed MAMP on my Mac, but the PHP 5.4.10 distributed with
> MAMP doesn't have the SQLite params required in its php.ini
>
> Why ?
> What should I do to have SQLite 2.8.x work as fine on my Mac as it
> does on my PC ?
>
> (please, don't tell me to go SQLite 3 :-)
>

The following link shows the development history of SQLite2.  Pay close
attention to the dates.

 http://www.sqlite.org/src/timeline?n=200=version_2

Compare with SQLite3:

 http://www.sqlite.org/src/timeline?n=200


>
> Thanks.
>
> Didier
> Toulouse, France
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Didier Morandi
Hello Friends,

A new SQLite Chap in the Team, here.
I successfully installed on my PC/Windoz WAMP and SQLite 2.8.x (I do
not know anything about PDO...) and built my first appli. Works fine,
thanks.
I then installed MAMP on my Mac, but the PHP 5.4.10 distributed with
MAMP doesn't have the SQLite params required in its php.ini

Why ?
What should I do to have SQLite 2.8.x work as fine on my Mac as it
does on my PC ?

(please, don't tell me to go SQLite 3 :-)

Thanks.

Didier
Toulouse, France
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users