Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Simon Slavin
On 5 Aug 2017, at 10:10pm, J. King wrote: > Simon, why would you recommend not using PDO? Does the SQLite3 extension > perform better, or does it boil down to personal preference? Good question. Please allow me slight simplification in the following. PHP’s SQLite3

Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread J. King
Simon, why would you recommend not using PDO? Does the SQLite3 extension perform better, or does it boil down to personal preference? On August 5, 2017 1:35:43 PM EDT, Simon Slavin wrote: > > >On 5 Aug 2017, at 10:53am, Edmondo Borasio >wrote: >

Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Simon Slavin
On 5 Aug 2017, at 10:53am, Edmondo Borasio wrote: > Hey, do you know where I can find good instructions on how to use SQLITE in > PHP? I used to do that for a living. First, use the sqlite3 module. Don’t use the PDO module which can access many types of database.

Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Edmondo Borasio
Bingo! Many thanks! Hey, do you know where I can find good instructions on how to use SQLITE in PHP? I have searched a lot but haven't found much more than isolated questions from different users on some forum... Regards Edmondo Dr Edmondo Borasio, MedC BQ Ophth, FEBO Consultant

Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Tim Streater
On 5 Aug 2017, at 9:35, Edmondo Borasio wrote: > $results = $db->query("SELECT MAX(ID) FROM Table")->fetchArray(); > $Highest_ID = $results['ID']; > var_dump($Highest_ID); > > I get NULL Try: $results = $db->query("SELECT MAX(ID) as mx FROM

[sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Edmondo Borasio
$results = $db->query("SELECT MAX(ID) FROM Table")->fetchArray(); $Highest_ID = $results['ID']; var_dump($Highest_ID); I get NULL Cheers Ed ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org