Fork me on GitHub
Subscribe 6

Ticket #906 (open enhancement)

SQLite3 database driver

  • Created: 2013-10-02 15:49:36
  • Reported by: Franz
  • Assigned to: Franz
  • Milestone: 1.6
  • Component: database
  • Priority: normal

It's about time that we support SQLite3.

History

quy 2013-10-20 18:57:07

Lets push this to v1.5.6 and keep v.1.5.5 a bug fix release only.

Franz 2013-10-20 20:32:33

Fine with me.

Franz 2013-11-14 00:19:36

  • Milestone changed from 1.5.5 to 1.5.6.

This is making some progress, but will need a bit more testing than we can put in until release of 1.5.5.

Franz 2013-11-21 14:01:02

I am essentially done, however this probably won't be usable, because rowCount(), the num_rows equivalent of PDO, isn't supported by SQLite3. What a pain.

Franz 2013-11-21 14:10:47

Commit 94fd0b7 to fluxbb sqlite3

#906: Use SQLite-specific queries in SQLite3 adapter, too.

Franz 2013-11-21 14:11:33

Commit 0dd8a6d to fluxbb sqlite3

#906: Implement SQLite3 driver.

Franz 2013-12-10 21:15:40

Koos' work on this might help us. It's a hack, though: https://github.com/Koos10/fluxbb

Franz 2013-12-12 21:39:12

Commit cb1928b to fluxbb sqlite3

#906: Implement hack-ish solution for SQLite's num_rows feature.

Franz 2014-01-08 23:14:27

  • Milestone changed from 1.5.6 to 1.5.7.

Franz 2014-10-20 11:51:34

  • Milestone changed from 1.5.7 to 1.5.8.

Franz 2015-01-18 14:57:27

  • Milestone changed from 1.5.8 to 1.5.9.

adaur 2015-06-10 21:33:10

Why isn't this implemented yet? Koos' solution works perfectly (and doesn't produce notices once you apply my patch)

https://github.com/Koos10/fluxbb

adaur 2015-11-04 15:56:27

Franz, can you pull your solution to finally close this ticket? smile

Franz 2015-11-05 09:05:25

  • Status changed from open to fixed.

Franz 2015-11-07 19:56:20

  • Milestone changed from 1.5.9 to 1.5.10.

quy 2016-01-13 22:43:22

  • Status changed from fixed to open.

Installation not completed. The database was created, but no tables. Got a white blank screen. No entries in the error log.

Installed SQLite successfully with Luna, and PunBB.

Franz 2016-01-14 06:56:50

PunBB has SQLite 3?

quy 2016-01-14 07:14:24

Yes since 2011.

quy 2016-01-16 01:17:21

Could it be that sqlite_seek and sqlite_current are available in PHP 5 < 5.4.0? I'm on PHP: 5.6.3. Maybe we can use Luna's sqlite3.php (wink)?

	function result($result = 0, $row = 0, $col = 0)
	{
		if ($result)
		{
			if ($row !== 0 && @sqlite_seek($result, $row) === false)
				return false;

			$cur_row = @sqlite_current($result);
			if ($cur_row === false)
				return false;

			return $cur_row[$col];
		}
		else
			return false;
	}

Studio384 2016-01-16 18:23:39

Well, Luna's implementation is functional but it is not without it's problems (which is why the installer titles it as "SQLite 3 Experimental") though I'm hoping to fix them shortly.

quy 2016-01-29 22:36:42

I am in favor of pushing this to v1.6.

Franz 2016-06-16 06:22:43

  • Milestone changed from 1.5.10 to 1.6.

Franz 2016-06-16 07:26:06

Commit 5acb874 to fluxbb sqlite3

#906: Use SQLite-specific queries in SQLite3 adapter, too.

Franz 2016-06-16 07:26:25

Commit df47877 to fluxbb sqlite3

#906: Implement SQLite3 driver.

Franz 2016-06-16 07:26:36

Commit 128bea8 to fluxbb sqlite3

#906: Implement hack-ish solution for SQLite's num_rows feature.

Franz 2017-08-09 20:40:57

Apparently there's still some old code left over: https://fluxbb.org/forums/viewtopic.php … 734#p63734