[Asterisk-Dev] MYSQL application

Constantine Filin cfilin at intermedia.net
Fri Jul 30 10:52:49 MST 2004


Greetings -

I coded a new Asterisk application called MYSQL which is similar to
application PGSQL but works with MYSQL. The syntax of the application 
is:

-------------------
*CLI> show application Mysql

  -= Info about application 'MYSQL' =-

[Synopsis]:
Do several mySQLy things

[Description]:
MYSQL(): Do several mySQLy things
Syntax:
  MYSQL(Connect connid dhhost dbuser dbpass dbname)
    Connects to a database. Arguments contain standard MySQL parameters
    passed to function mysql_real_connect. Connection identifer returned
    in ${var}
  MYSQL(Query resultid ${connid} query-string)
    Executes standard MySQL query contained in query-string using
    established connection identified by ${connection_identifier}. 
    Result of query is stored in ${var}.
  MYSQL(Fetch fetchid ${resultid} var1 var2 ... varn)
    Fetches a single row from a result set contained in 
    ${result_identifier}. Assigns returned fields to ${var1} ... 
    ${varn}. ${fetchid} is set TRUE if additional rows exist in 
    result set.
  MYSQL(Clear ${resultid})
    Frees memory and datastructures associated with result set.
  MYSQL(Disconnect ${connid})
    Disconnects from named connection to MySQL.
*CLI>
-------------------

The source code is uploaded 
http://bugs.digium.com/file_download.php?file_id=2510&type=bug

If anybody is willing to test this out, I will help with installation.

Thanks!

Constantine



More information about the asterisk-dev mailing list