View unanswered posts | View active topics It is currently June 21st, 2018, 6:26 am

Reply to topic  [ 1 post ] 
 Can't make SQLite to work with QuickPHP 
Author Message

Joined: August 3rd, 2017, 12:05 am
Posts: 1
Post Can't make SQLite to work with QuickPHP
Hi, this is what I have done:

  1. Unpacked QuickPHP to C:\QuickPHP\
  2. Downloaded and unzipped from it php_pdo_sqlite.dll and php.ini to C:\QuickPHP\
  3. Within php.ini I've uncommented:
    1. extension=php_pdo_sqlite.dll line
    2. extension_dir = "C:\QuickPHP\"

When I start QuickPHP it starts without any errors BUT it doesn't work, when I test it with the very simple PHP page which looks like this:

    $db = new PDO('sqlite:C:\QuickPHP\angular.db');                     
   $result = $db->query('SELECT * FROM employees');
    foreach($result as $row) {
      print $row['name']."\n";

angular.db has a table of four columns and test data is already inserted.

The error I'm getting says invalid argument supplied for foreach(). If I commend off the foreach loop, I'm getting the empty page and no errors.

August 3rd, 2017, 12:29 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB.