Without  issuing a separate loop thru  a result set. Is there any way
anyone knows of to output the number of rows a mysql query returned.

 

Aka

..

exten => 1,n,MYSQL(Query resultid ${connid} SELECT\ `State`\ FROM\
`AreaCodes`\ WHERE\ `AreaCode`=\'${CIDArea}\')

exten => 1,n(fetchrow),MYSQL(Fetch foundRow ${resultid} number) ; fetch row

exten => 1,n,GotoIf($["${foundRow}" = "1"]?done) ; leave loop if no row
found

exten => 1,n,Set(State=${State})

exten => 1,n,Goto(fetchrow) ; continue loop if row found

exten => 1,n,Set(RowsReturned=MYSQL(Fetch rowcount ${resultid})

exten => 1,n(done),MYSQL(Clear ${resultid})

..

 

 

 

 

 David Murphy          Systems Adminsitrator

myLogo

 Email:                                           AIM:

  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
lgdavidmurphy  

 

 

 

 

<<image001.jpg>>

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to