How to run a query, using vBulletin code
by
22 Apr 2002
I see alot of hackers asking in their hacks to add, alter, etc tables in order to make the specific hack work properly. The problem is that not everyone knows how to run them and also that not alot of people like to install extra programs (phpmyadmin for example) in order to run only a query. The easiest way is to use the vBulletin php code to do the job. Below is a .php file that I made to add the INFO table: Code:
<?php error_reporting(7); require("./global.php"); cpheader(); $doquery="CREATE TABLE info ( infoid smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment, title char(100) NOT NULL, PRIMARY KEY (infoid) )"; $DB_site->query("$doquery"); echo "Query successful.<br>"; echo "<font face='Courier' size='1'>$doquery</font>"; cpfooter(); ?> It would be a good idea that every hacker who requiers table mods, to add this system to their hacks. Have fun with your code. |