- Joined
- Sep 12, 2008
- Messages
- 27
- Reaction score
- 0
To view the content, you need to sign in or register
This will take the class type price and shop ID and placement and make the shop automatically just execute these Db files and edit the php file included; you can just use it on localhost as long as it can connect to a DB with the files I included as the DL below.
To view the content, you need to sign in or register
Have fun making shops in 3 seconds.
Code:
<?php
session_start();
/* MySQL */
$host = "localhost"; /* your host - standard: localhost */
$user = "root"; /* your database user - standard: root */
$pass = ""; /* your database password - standard: root */
$database = "odinms"; /* your database name - standard: odinms */
$conn = mysql_connect($host,$user,$pass);
$db = mysql_select_db($database, $conn) or die(mysql_error());
$class = "warrior";
$type = "top";
$shopid = "17679";
$placement = 0;
$price = "1000000";
$selTable = mysql_query("SELECT * FROM `mall_armor` WHERE `class`='".$class."' AND `type`='".$type."'");
echo "INSERT INTO `shopitems` (`shopid`,`itemid`,`price`,`position`) VALUES <br>";
while($r=mysql_fetch_array($selTable)) {
$placement++;
echo "<table border=\"0\">";
if(mysql_num_rows($selTable) == $placement) {
echo "<tr>($shopid, $r[itemid], $price, $placement);</tr>";
}else{
echo "<tr>($shopid, $r[itemid], $price, $placement),</tr>";
}
echo "</table>";
}
?>
This one will do the ; at the bottom now.
Last edited: