Jump to content

pollux

Honorable Member
  • Posts

    264
  • Joined

  • Days Won

    23
  • Feedback

    0%

Posts posted by pollux

  1. Check if your table "is_items" has a field "vnum" with AUTO_INCREMENT flag enabled.

     

    Additionally add

    ini_set('display_errors', 1);

    on line 2, over

    error_reporting(E_ALL);

     

    to check if there really isn't any php error.

     

    Then replace on line 53

    if($inSql) echo'<p class="meldung">Item erfolgreich in den Itemshop eingef&uuml;gt.</p>';

    with

    if($inSql){
    	echo'<p class="meldung">Item erfolgreich in den Itemshop eingefügt.</p>';
    }else{
    	echo mysql_errno($sqlHp) . ": " . mysql_error($sqlHp) . "\n";
    }

    and run the script again.

  2. Replace line 48-51

    $sqlCmd="INSERT INTO ".SQL_HP_DB.".is_items
              (vnum, kategorie_id, bild, beschreibung, preis, anzeigen, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2)
              VALUES
              ('".$inVnum."','".$inKategorie."','".$bildDatei."','".$inBeschreibung."','".$inPreis."','".$inAnzeigen."','".$boni0."', '".$boniv0."', '".$boni1."', '".$boniv1."', '".$boni2."', '".$boniv2."', '".$boni3."', '".$boniv3."', '".$boni4."', '".$boni4."', '".$boni5."', '".$boniv5."', '".$boni6."', '".$boniv6."', '".$socket0."', '".$socket1."', '".$socket1."')";

    with

    $sqlCmd="INSERT INTO ".SQL_HP_DB.".is_items
              (kategorie_id, bild, beschreibung, preis, anzeigen, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2)
              VALUES
              ('".$inKategorie."','".$bildDatei."','".$inBeschreibung."','".$inPreis."','".$inAnzeigen."','".$boni0."', '".$boniv0."', '".$boni1."', '".$boniv1."', '".$boni2."', '".$boniv2."', '".$boni3."', '".$boniv3."', '".$boni4."', '".$boni4."', '".$boni5."', '".$boniv5."', '".$boni6."', '".$boniv6."', '".$socket0."', '".$socket1."', '".$socket1."')";

    and try again.

  3. Maybe because it's SQL? :D

     

    Your current query should look like this:

    INSERT INTO workorders VALUES ($column1, $column2);

    so you have to add "(column1, column2)" to it.

    INSERT INTO workorders (column1, column2) VALUES ($column1, $column2)

     

    Replace column1/column2/... with your columns of your table in which you want to insert the values. If you need more help please post your php code.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.