• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

SQL Queries through subpage not phpmyadmin

Vendeliko

Banned User
Joined
Dec 3, 2011
Messages
3,087
Reaction score
93
Location
Beside that guy with that thing but without that t
Hi,could anyone please give me a script for a subpage through which I can execute sql queries?
What I mean is,instead of going to phpmyadmin to execute a sql query I can just go to for example xxx.com/?subtopic=sqlquery and as soon as I enter it the query executes.

Thanks in advance,
Vendeliko.
 
so it will be..something like:
sqlquery.php
PHP:
<?php
mysql_connect("localhost","root","PASSWORD"); 
mysql_select_db("DATABASE"); 
mysql_query("CREATE TABLE `monkeypay_pg1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `account` varchar(50) NOT NULL, `time` int(15) NOT NULL,`points` smallint(4) NOT NULL,`params` varchar(1024) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;");
?>

it's made in php, but the mysql connections I supose that have a function in gesior but I don't know, if somebody knows..but it will work anyway


edit:
remember to put this in index.php

PHP:
case "sqlquery":
                $topic = "sqlquery";
                $subtopic = "sqlquery";
                include("sqlquery.php");
        break;
 
Last edited:
Back
Top