David,

The brew/install worked and created the sqlite app and library in the locations 
specified in your instructions.

I can load the math lib from the .load (dot load) command line,
The median function works as I wanted

but the ‘load_extension’ select statement did not work; I get a command entry 
continuation line as follows

sqlite> select 
load_extension('/usr/local/opt/sqlite/lib/libsqlitefunctions.dylib’);
   …>

I need to be able to load the extension from within a PHP script

Thoughts?

Thanks.

Ron Gombach
mailto:ron...@gombach.com <mailto:ron...@gombach.com>


> On Nov 21, 2016, at 12:15 PM, David Goldwich 
> <david.goldwich+sql...@gmail.com> wrote:
> 
> On Mon, Nov 21, 2016 at 1:12 PM, Ronald Gombach <ron...@gombach.com> wrote:
>> 
>> Is there a pre-c binary of SQLIte available for down load that includes a 
>> math library. I particularly need the “median” function.
>> 
>> If not, can someone point me to instructions on compilation command line to 
>> include the math library (OS-X).
> 
> Homebrew can do that conveniently:
> 
> $ brew update && brew install --with-functions sqlite
> $ /usr/local/opt/sqlite/bin/sqlite3
> sqlite> select 
> load_extension('/usr/local/opt/sqlite/lib/libsqlitefunctions.dylib’);
> sqlite> select pi();
> pi()
> 3.14159265358979
> 
> The “math library” here being extension-functions.c from
> https://www.sqlite.org/contrib/.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to