[Freeswitch-users] Getting started with db from php

Avi Marcus avi at avimarcus.net
Fri Jul 20 12:44:37 MSD 2012


Try with SQLite3
-Avi


On Fri, Jul 20, 2012 at 11:40 AM, Alex <alex at thewinelake.com> wrote:

> Trying to do some stuff with the voicemail database from a php script.
> Couldn't quickly find the connection runes to the sqlite DB.
>
> Tried the following, but got the error "file is encrypted or is not a
> database"
>
> <?php
> echo sqlite_libversion();
> echo "<br>";
>
> echo phpversion();
> $dbhandle = sqlite_open('/usr/local/freeswitch/db/voicemail_default.db',
> 0666, $error);
> if (!$dbhandle) die ($error);
>
> $sql = "SELECT * from voicemail_prefs";
>
> $result = sqlite_exec($dbhandle, $stm, $error);
> while ($row = sqlite_fetch_array($result, SQLITE_ASSOC)) {
> print_r($row);
> }
>
> ?>
>
>
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120720/fed556d7/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list