Bug->Req #81534 [Opn]: Math Functions are not working on SQLITE connection.

From: Date: Mon, 18 Oct 2021 08:13:51 +0000
Subject: Bug->Req #81534 [Opn]: Math Functions are not working on SQLITE connection.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237252@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81534&edit=1

 ID:                 81534
 Updated by:         cmb@php.net
 Reported by:        iyashpal dot dev at gmail dot com
 Summary:            Math Functions are not working on SQLITE connection.
 Status:             Open
-Type:               Bug
+Type:               Feature/Change Request
 Package:            SQLite related
 Operating System:   Windows 11, 10
 PHP Version:        8.0.11
 Block user comment: N
 Private report:     N

 New Comment:

These functions need to be explicitly enabled when building
SQLite3[1], what has not been done so far.  Are these usually
available on other systems?

[1] <https://www.sqlite.org/lang_mathfunc.html>


Previous Comments:
------------------------------------------------------------------------
[2021-10-18 06:16:45] iyashpal dot dev at gmail dot com

PHP files were downloaded from this link : https://windows.php.net/download#php-8.0

I have tested this on Windows 10 Pro and 11 Pro.

------------------------------------------------------------------------
[2021-10-18 06:10:49] iyashpal dot dev at gmail dot com

Description:
------------
PHP Version: 8.0.11
OS Edition: Windows 11 Pro
OS Version: 21H2
OS Build: 22000.258

PHP Framework Used: Laravel 8.63
 

Test script:
---------------
Route::get('/', function () {

    $sqlite = new SQLite3(base_path('sqlite3.dbi'), SQLITE3_OPEN_READWRITE);


    dd($sqlite->query('SELECT SQRT(4)'));
    dd(DB::select("SELECT SQRT(4)"));
    return view('welcome');
});

Expected result:
----------------
Should show 2

Actual result:
--------------
ErrorException
SQLite3::query(): Unable to prepare statement: 1, no such function: SQRT


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81534&edit=1


Thread (12 messages)

« previous php.bugs (#237252) next »