HEX
Server: nginx/1.18.0
System: Linux srv01 5.15.0-171-generic #181-Ubuntu SMP Fri Feb 6 22:44:50 UTC 2026 x86_64
User: RaviMohan (1026)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/SimranTrikha/bwebz.com/web/control/ajaxquery.php
<?php
/*

SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/

ajaxquery.php
- used for a variety of ajax functionality - runs a background query

MIT license

2008 Calvin Lough <http://calv.in>

*/

include "functions.php";

loginCheck();

if (isset($db))
	$conn->selectDB($db);

if (isset($_POST['query'])) {
	$queryList = splitQueryText($_POST['query']);
	
	foreach ($queryList as $query) {
		$sql = $conn->query($query);
	}
}

//return the first field from the first row
if (!isset($_POST['silent']) && $conn->isResultSet($sql)) {
	$row = $conn->fetchArray($sql);
	echo nl2br(htmlentities($row[0], ENT_QUOTES, 'UTF-8'));
}

?>