DB fetch

From FreeSWITCH Wiki
Jump to: navigation, search

This gets the next row from a select

Synopsis

fetch()

Example

use("CoreDB");

var db = new CoreDB("js");
var sql="select * from users;";
db.prepare(sql);
while(db.next()) {
  hash = db.fetch();
  console_log("name = " + hash["name"] + " number " + hash["did"] + "\n");
}

See Also