SQL.php
From Organic Design wiki
(Redirected from History.php)
<? $db =& wfGetDB( DB_MASTER );
- Get commands if admin
if ($GLOBALS['xwIsAdmin']) { if (xwGetProperty($properties, "SQL/query", $query)) { xwMessage("Attempting to execute SQL query \"$query\""); $result = $db->query($query); # Render result rows as messages while ($row = mysql_fetch_assoc($result)) { $msg = ; foreach ($row as $k => $v) $msg .= "$k = $v, "; xwMessage($msg,'red'); } } } ?>