[Release]Simple SQL TO XML Converter

10/05/2013 09:40 TraxWall#1
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 lollozzo#2
how it works? i need to create a file .bat? visual basic? what i need to do? :)
10/05/2013 13:54 TraxWall#3
This is a PHP file: D
Web Server to be
recommended XAMPP
10/05/2013 13:56 Metin2 Team#4
you need a webserver and edit your MySQL details to make it work.

Thank you for your effort :)
10/05/2013 13:58 lollozzo#5
Thank you man :D

It works 100%, thanks <3
10/05/2013 15:20 xSanii#6
I already have a tool like this, but thanks for sharing will beusefull for others ;)
10/05/2013 17:08 Akzyra#7
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 :)

10/05/2013 20:02 TraxWall#8
Quote:
Originally Posted by Akzyra View Post
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 :)

Thank you.
Anyway, I base my webserver was turned off PHP error