Macros For MySQL Functions

From Baranoski.ca
Revision as of 13:56, 13 June 2013 by Casey (talk | contribs) (Created page with "<PRE style="color:white;background-color:black;font-weight:bold;font-size:1.2em;"> ; ==== MYSQL FETCH ============================================================ [macro-MYSQL...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
; ==== MYSQL FETCH ============================================================
[macro-MYSQLFETCH]

exten => s,1,MYSQL(Connect connid localhost asterisk yourpassword asterisk)
exten => s,n,MYSQL(Query resultid ${connid} ${ARG2})
exten => s,n,MYSQL(Fetch fetchid ${resultid} ${ARG1})
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})


; ==== MYSQL UPDATE ===========================================================
[macro-MYSQLUPDATE]
exten => s,1,MYSQL(Connect connid localhost asterisk yourpassword asterisk)
exten => s,n,MYSQL(Query resultid ${connid} ${URIDECODE(${ARG1})})
exten => s,n,MYSQL(Disconnect ${connid})