|
You last visited: Today at 07:35
Advertisement
[Release]Simple SQL TO XML Converter
Discussion on [Release]Simple SQL TO XML Converter within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
10/05/2013, 09:40
|
#1
|
elite*gold: 0
Join Date: Oct 2010
Posts: 178
Received Thanks: 86
|
[Release]Simple SQL TO XML Converter
Hello
Here is a simple conversion that I item_proto
Code
PHP Code:
<?php # MySQL host $host = 'SQL Host'; # MySQL port $port = '3306'; # MySQL User $user = 'SQL User'; # MySQL Password $password = 'SQL PW'; $adatbazis_kapcs = mysql_connect($host.":".$port, $user, $password);
?>
<?php
$sql = "SELECT * FROM player.item_proto";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
?>
<textarea rows="4" cols="130"><Item vnum="<?php echo $row["vnum"]; ?>" hashName="<?php echo $row["name"]; ?>" name="<?php echo $row["locale_name"]; ?>" type="<?php echo $row["type"]; ?>" subtype="<?php echo $row["subtype"]; ?>" weight="<?php echo $row["weight"]; ?>" size="<?php echo $row["size"]; ?>" antiflag="<?php echo $row["antiflag"]; ?>" flag="<?php echo $row["flag"]; ?>" wearflag="<?php echo $row["wearflag"]; ?>" immuneflag="<?php echo $row["immuneflag"]; ?>" gold="<?php echo $row["gold"]; ?>" buy_price="<?php echo $row["shop_buy_price"]; ?>" limittype0="<?php echo $row["limittype0"]; ?>" limitvalue0="<?php echo $row["limitvalue0"]; ?>" limittype1="<?php echo $row["limittype1"]; ?>" limitvalue1="<?php echo $row["limitvalue1"]; ?>" applytype0="<?php echo $row["applytype0"]; ?>" applyvalue0="<?php echo $row["applyvalue0"]; ?>" applytype1="<?php echo $row["applytype1"]; ?>" applyvalue1="<?php echo $row["applyvalue1"]; ?>" applytype2="<?php echo $row["applytype2"]; ?>" applyvalue2="<?php echo $row["applyvalue2"]; ?>" value0="<?php echo $row["value0"]; ?>" value1="<?php echo $row["value1"]; ?>" value2="<?php echo $row["value2"]; ?>" value3="<?php echo $row["value3"]; ?>" value4="<?php echo $row["value4"]; ?>" value5="<?php echo $row["value5"]; ?>" socket0="<?php echo $row["socket0"]; ?>" socket1="<?php echo $row["socket1"]; ?>" socket2="<?php echo $row["socket2"]; ?>" socket3="<?php echo $row["socket3"]; ?>" socket4="<?php echo $row["socket4"]; ?>" socket5="<?php echo $row["socket5"]; ?>" refine_vnum="<?php echo $row["refine_vnum"]; ?>" refine_set="<?php echo $row["refine_set"]; ?>" magic_pct="<?php echo $row["magic_pct"]; ?>" specular="<?php echo $row["specular"]; ?>" socket_pct="<?php echo $row["socket_pct"]; ?>" /></textarea><br> <?php } ?>
|
|
|
10/05/2013, 13:16
|
#2
|
elite*gold: 0
Join Date: Sep 2011
Posts: 76
Received Thanks: 48
|
how it works? i need to create a file .bat? visual basic? what i need to do?
|
|
|
10/05/2013, 13:54
|
#3
|
elite*gold: 0
Join Date: Oct 2010
Posts: 178
Received Thanks: 86
|
This is a PHP file: D
Web Server to be
recommended XAMPP
|
|
|
10/05/2013, 13:56
|
#4
|
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
|
you need a webserver and edit your MySQL details to make it work.
Thank you for your effort
|
|
|
10/05/2013, 13:58
|
#5
|
elite*gold: 0
Join Date: Sep 2011
Posts: 76
Received Thanks: 48
|
Thank you man
It works 100%, thanks <3
|
|
|
10/05/2013, 15:20
|
#6
|
elite*gold: 2
Join Date: Nov 2008
Posts: 628
Received Thanks: 1,633
|
I already have a tool like this, but thanks for sharing will beusefull for others
|
|
|
10/05/2013, 17:08
|
#7
|
elite*gold: 0
Join Date: Sep 2012
Posts: 124
Received Thanks: 80
|
Use it like that, then everything is in one fiel and easier to copy/paste.
Every line is one line in the mysql table.
PHP error are turned of -> You copy no error in your xml
PHP Code:
<textarea style="height:100%;width:100%;" wrap="off"> <?php // Error Reporting komplett abschalten error_reporting(0); # MySQL host $host = 'localhost'; # MySQL port $port = '3306'; # MySQL User $user = 'root'; # MySQL Password $password = 'password'; $sql = mysql_connect($host.":".$port, $user, $password); $query = "SELECT * FROM player.item_proto"; $result = mysql_query($query,$sql); while ($row = mysql_fetch_assoc($result)) { ?> <Item vnum="<?=$row["vnum"]; ?>" hashName="<?=$row["name"]; ?>" name="<?=$row["locale_name"]; ?>" type="<?=$row["type"]; ?>" subtype="<?=$row["subtype"]; ?>" weight="<?=$row["weight"]; ?>" size="<?=$row["size"]; ?>" antiflag="<?=$row["antiflag"]; ?>" flag="<?=$row["flag"]; ?>" wearflag="<?=$row["wearflag"]; ?>" immuneflag="<?=$row["immuneflag"]; ?>" gold="<?=$row["gold"]; ?>" buy_price="<?=$row["shop_buy_price"]; ?>" limittype0="<?=$row["limittype0"]; ?>" limitvalue0="<?=$row["limitvalue0"]; ?>" limittype1="<?=$row["limittype1"]; ?>" limitvalue1="<?=$row["limitvalue1"]; ?>" applytype0="<?=$row["applytype0"]; ?>" applyvalue0="<?=$row["applyvalue0"]; ?>" applytype1="<?=$row["applytype1"]; ?>" applyvalue1="<?=$row["applyvalue1"]; ?>" applytype2="<?=$row["applytype2"]; ?>" applyvalue2="<?=$row["applyvalue2"]; ?>" value0="<?=$row["value0"]; ?>" value1="<?=$row["value1"]; ?>" value2="<?=$row["value2"]; ?>" value3="<?=$row["value3"]; ?>" value4="<?=$row["value4"]; ?>" value5="<?=$row["value5"]; ?>" socket0="<?=$row["socket0"]; ?>" socket1="<?=$row["socket1"]; ?>" socket2="<?=$row["socket2"]; ?>" socket3="<?=$row["socket3"]; ?>" socket4="<?=$row["socket4"]; ?>" socket5="<?=$row["socket5"]; ?>" refine_vnum="<?=$row["refine_vnum"]; ?>" refine_set="<?=$row["refine_set"]; ?>" magic_pct="<?=$row["magic_pct"]; ?>" specular="<?=$row["specular"]; ?>" socket_pct="<?=$row["socket_pct"]; ?>" /> <?php } ?> </textarea><br>
|
|
|
10/05/2013, 20:02
|
#8
|
elite*gold: 0
Join Date: Oct 2010
Posts: 178
Received Thanks: 86
|
Quote:
Originally Posted by Akzyra
Use it like that, then everything is in one fiel and easier to copy/paste.
Every line is one line in the mysql table.
PHP error are turned of -> You copy no error in your xml
PHP Code:
<textarea style="height:100%;width:100%;" wrap="off"> <?php // Error Reporting komplett abschalten error_reporting(0); # MySQL host $host = 'localhost'; # MySQL port $port = '3306'; # MySQL User $user = 'root'; # MySQL Password $password = 'password'; $sql = mysql_connect($host.":".$port, $user, $password); $query = "SELECT * FROM player.item_proto"; $result = mysql_query($query,$sql); while ($row = mysql_fetch_assoc($result)) { ?> <Item vnum="<?=$row["vnum"]; ?>" hashName="<?=$row["name"]; ?>" name="<?=$row["locale_name"]; ?>" type="<?=$row["type"]; ?>" subtype="<?=$row["subtype"]; ?>" weight="<?=$row["weight"]; ?>" size="<?=$row["size"]; ?>" antiflag="<?=$row["antiflag"]; ?>" flag="<?=$row["flag"]; ?>" wearflag="<?=$row["wearflag"]; ?>" immuneflag="<?=$row["immuneflag"]; ?>" gold="<?=$row["gold"]; ?>" buy_price="<?=$row["shop_buy_price"]; ?>" limittype0="<?=$row["limittype0"]; ?>" limitvalue0="<?=$row["limitvalue0"]; ?>" limittype1="<?=$row["limittype1"]; ?>" limitvalue1="<?=$row["limitvalue1"]; ?>" applytype0="<?=$row["applytype0"]; ?>" applyvalue0="<?=$row["applyvalue0"]; ?>" applytype1="<?=$row["applytype1"]; ?>" applyvalue1="<?=$row["applyvalue1"]; ?>" applytype2="<?=$row["applytype2"]; ?>" applyvalue2="<?=$row["applyvalue2"]; ?>" value0="<?=$row["value0"]; ?>" value1="<?=$row["value1"]; ?>" value2="<?=$row["value2"]; ?>" value3="<?=$row["value3"]; ?>" value4="<?=$row["value4"]; ?>" value5="<?=$row["value5"]; ?>" socket0="<?=$row["socket0"]; ?>" socket1="<?=$row["socket1"]; ?>" socket2="<?=$row["socket2"]; ?>" socket3="<?=$row["socket3"]; ?>" socket4="<?=$row["socket4"]; ?>" socket5="<?=$row["socket5"]; ?>" refine_vnum="<?=$row["refine_vnum"]; ?>" refine_set="<?=$row["refine_set"]; ?>" magic_pct="<?=$row["magic_pct"]; ?>" specular="<?=$row["specular"]; ?>" socket_pct="<?=$row["socket_pct"]; ?>" /> <?php } ?> </textarea><br>
|
Thank you.
Anyway, I base my webserver was turned off PHP error
|
|
|
|
Similar Threads
|
[Release] SQL to XML Converter (Hen! CMS)
08/31/2013 - Metin2 PServer Guides & Strategies - 5 Replies
Hi epvp :pimp:
Item Proto Converter
Code:
<h2>ItemProto.sql to ItemProto.xml Converter By DexterSK</h2>
<?php
if($_SESSION>=$adminRights)
{
if(isset($_POST))
|
[Release].php SQL zu XML Converter
06/14/2012 - Metin2 PServer Guides & Strategies - 8 Replies
Hey ho,
ich hab mir mal die Mühe gemacht *hust* und habe einen .php Script erstellt, mit welchem man Items & Monster ( item_proto & mob_proto ) aus der Datenbank in das XML Format umwandelt.
Wozu man das braucht?
Wenn ihr "locale_name" habt:
|
[Release]DDS-Converter
01/20/2011 - Metin2 PServer Guides & Strategies - 22 Replies
Hey ich habe heute mal mein Desktop aufgeräumt :P und da fand ich plötzlich eine komische Datei. Aufeinmal stellte sich raus das es ein DDS-Converter war. Er wandelt DDS Dateien in jpg und png dateien um.
Da das für manche Client´s nützlich ist dachte ich ich stell es mal hier rein.
Virustotal Screen
http://img3.fotos-hochladen.net/uploads/virrustot al0t16k9zq.png
Screen vom Programm
http://img3.fotos-hochladen.net/uploads/programmn gw8demb.png
MfG Fun-Zocker
|
[RELEASE] DDS converter
08/18/2009 - EO PServer Guides & Releases - 9 Replies
Well, because this is a tool, i post it here and not on another section :bandit:
People were complaining they cant open or edit a dds file..
This tool, can convert the dds file to jpg,png,bmp,tga
and it can convert "to" dds :handsdown:
|
[Share] Simple little Hex converter
09/25/2008 - RFO Hacks, Bots, Cheats, Exploits & Guides - 2 Replies
Simple little tool to figure hex, binary, and decimal conversions.
just type in what # you wanna convert and hit <enter>
|
All times are GMT +2. The time now is 07:35.
|
|