Aller au contenu
Top-Metin2.org - Vous êtes à la recherche d'un serveur Metin 2 ? ×
×
×
  • Créer...
  • 0

PHP script xml <=> sql


dragondeau

Question

Version des files : 2012 Domaine (Base de données, Core, etc.) : PHPVotre niveau (débutant, intermédiaire, avancé) : DébutantDescription du problème :J'ai voulu mettre le script PHP qui permet de passer du fichier xml à mysql (et inversement) sur mon site en local. J'ai les erreurs suivantes :

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\item.php on line [i]2[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]020.0100261280[url=http://www.php.net/function.mysql-connect]mysql_connect[/url] ( )..\item.php[b]:[/b]2[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$gb2312name in C:\wamp\www\item.php on line [i]9[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0[color=#fce94f][size=large]( ! )[/size][/color] Notice: Undefined property: stdClass::$imuneflag in C:\wamp\www\item.php on line [i]17[/i]Call Stack#TimeMemoryFunctionLocation10.0100260976{main}( )..\item.php[b]:[/b]0

Et ça continue...Le script :

<?PHP$sqlServ = mysql_connect('192.168.1.96', 'root', '16427crl');$sqlCmd = "SELECT * FROM player.item_proto";$sqlQry = mysql_query($sqlCmd,$sqlServ);while($item_proto = mysql_fetch_object($sqlQry)){    $vnum = $item_proto->vnum;    $name = $item_proto->name;    $locale_name = $item_proto->gb2312name;    $type = $item_proto->type;    $subtype = $item_proto->subtype;    $weight = $item_proto->weight;    $size = $item_proto->size;    $antiflag = $item_proto->antiflag;    $flag = $item_proto->flag;    $wearflag = $item_proto->wearflag;    $immuneflag = $item_proto->imuneflag;    $gold = $item_proto->gold;    $buy_price = $item_proto->shop_buy_price;    $limittype0 = $item_proto->limittype0;    $limitvalue0 = $item_proto->limitvalue0;    $limittype1 = $item_proto->limittype1;    $limitvalue1 = $item_proto->limitvalue1;    $applytype0 = $item_proto->applytype0;    $applyvalue0 = $item_proto->applyvalue0;    $applytype1 = $item_proto->applytype1;    $applyvalue1 = $item_proto->applyvalue1;    $applytype2 = $item_proto->applytype2;    $applyvalue2 = $item_proto->applyvalue2;    $value0 = $item_proto->value0;    $value1 = $item_proto->value1;    $value2 = $item_proto->value2;    $value3 = $item_proto->value3;    $value4 = $item_proto->value4;    $value5 = $item_proto->value5;    $socket0 = $item_proto->socket0;    $socket1 = $item_proto->socket1;    $socket2 = $item_proto->socket2;    $socket3 = $item_proto->socket3;    $socket4 = $item_proto->socket4;    $socket5 = $item_proto->socket5;    $refine_vnum = $item_proto->refined_vnum;    $refine_set = $item_proto->refine_set;    $magic_pct = $item_proto->magic_pct;    $specular = $item_proto->specular;    $socket_pct  = $item_proto->socket_pct;?>
<Itemvnum="<?php echo($vnum) ?>"name="'<?php echo($name) ?>'"gb2312name="<?php echo($locale_name) ?>"type="<?php echo($type) ?>"subtype="<?php echo($subtype) ?>"weight="<?php echo($weight) ?>"size="<?php echo($size) ?>"antiflag="<?php echo($antiflag) ?>"flag="<?php echo($flag) ?>"wearflag="<?php echo($wearflag) ?>"immuneflag="<?php echo($imuneflag) ?>"gold="<?php echo($gold) ?>"buy_price="<?php echo($buy_price) ?>"limittype0="<?php echo($limittype0) ?>"limitvalue0="<?php echo($limitvalue0) ?>"limittype1="<?php echo($limittype1) ?>"limitvalue1="<?php echo($limitvalue1) ?>"applytype0="<?php echo($applytype0) ?>"applyvalue0="<?php echo($applyvalue0) ?>"applytype1="<?php echo($applytype1) ?>"applyvalue1="<?php echo($applyvalue1) ?>"applytype2="<?php echo($applytype2) ?>"applyvalue2="<?php echo($applyvalue2) ?>"value0="<?php echo($value0) ?>"value1="<?php echo($value1) ?>"value2="<?php echo($value2) ?>"value3="<?php echo($value3) ?>"value4="<?php echo($value4) ?>"value5="<?php echo($value5) ?>"socket0="<?php echo($socket0) ?>"socket1="<?php echo($socket1) ?>"socket2="<?php echo($socket2) ?>"socket3="<?php echo($socket3) ?>"socket4="<?php echo($socket4) ?>"socket5="<?php echo($socket5) ?>"refine_vnum="<?php echo($refine_vnum) ?>"refine_set="<?php echo($refine_set) ?>"magic_pct="<?php echo($magic_pct) ?>"specular="<?php echo($specular) ?>"socket_pct="<?php echo($socket_pct) ?>"/>
<?php}    ?>

Je l'avais déjà utilisé il y a fort longtemps et ça marchait très bien...Une idée du problème ?

Lien vers le commentaire
Partager sur d’autres sites

  • Réponses 1
  • Créé
  • Dernière réponse

Meilleurs contributeurs dans cette question

Meilleurs contributeurs dans cette question

1 réponse à cette question

Messages recommandés

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.


  • brilliantdiscord_widget
  • Flux d'Activité

    1. 37
    2. 21

      Metin2 en 2020 peut-on en parler?

    3. 0

      METIN2Project

    4. 3

      Ressources - UnPack - Metin2 Client - Officiel

    5. 0

      Barre des tâches d'argent étendue

    6. 16

      Redémarrage automatique des channels

    7. 16

      Multi Logo GM / SGM / GA

  • En ligne récemment

    • Aucun utilisateur enregistré regarde cette page.

Information importante

Conditions d’utilisation / Politique de confidentialité / Règles / Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.