====== getRandRow ====== ~~NOTOC~~ == syntax == mixed getRandRow ( mixed $sql optional string[] $bindvars=false ) ===== Description ===== The function executes the function [[v5:reference:getarray|getArray()]] and returns a single random row from the returned recordset. See that function for more information about the passed parameters. ==== Usage ==== /* * DB2 Connection assumed */ $ar = $db->getRandRow("SELECT * FROM ACT"); /* * $ar returns: Array ( [0] => 30 [1] => DEFINE [2] => DEFINE SPECS ) */ /* * Execute again */ $ar = $db->getRandRow("SELECT * FROM ACT"); /* * $ar returns: Array ( [0] => 100 [1] => TEACH [2] => TEACH CLASSES ) */