[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    [Asterisk-Dev] MYSQL application
From:       "Constantine Filin" <cfilin () intermedia ! net>
Date:       2004-07-30 17:52:49
Message-ID: FD6AFE16B92B544E809E0EAC9C8B7850B65E2C () ex1 ! intermedia-inc ! net
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic