[release]Shops from class and shit

Joined
Sep 12, 2008
Messages
27
Reaction score
0


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.





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:
pretty obvious if u read the script tsunamishine. take your time to read the thread and script if u want to know. This allows you to create a shop without making the sql shop scrript but using a website to create teh shop. Correct me if im wrong
 
pretty obvious if u read the script tsunamishine. take your time to read the thread and script if u want to know. This allows you to create a shop without making the sql shop scrript but using a website to create teh shop. Correct me if im wrong
You are correct. It takes a few types of basic input and makes a shop out of it.
 
Back