Menu

Correction

Help
Jules_R2
2017-06-16
2017-06-16
  • Jules_R2

    Jules_R2 - 2017-06-16

    Hey dudes.
    I've been searching for a tool like Mysql table edit for a while, but once I've tried to use it... tons of warnings / errors.
    So, I just started PHP, but I solved the issues (basically undifined variables for most of them), and this is a fully working version of mte.php: https://www.mediafire.com/?j240dscrs0s554n

    Hope it helps.
    And.. please don't take care about my english.. I'm french actually.

    Jules.

     
  • Martin

    Martin - 2017-06-17

    Merci Jules!

    In the next version I will add most of your changes.
    The dirty fix on servers that display things:

    <?php 
    ini_set('display_errors', 0);
    

    Was there a problem with line 566?
    Or did you want a text-box for the auto increment?

    $field = "<input type='hidden' name='$key' value=''>[auto increment]";
    

    to:

    $result = mysqli_query ($this->mysqli, "SELECT $this->primary_key FROM $this->table ORDER BY $this->primary_key DESC LIMIT 1");
    $row = mysqli_fetch_array ($result, MYSQLI_NUM);
    $new_last_id = $row[0]+1;
    $field = "<input type='text' name='$key' value='$new_last_id'>[auto increment]";
    

    It could give a problem when the tabel auto increment increased while editing.

    Thanks again, Martin

     

    Last edit: Martin 2017-06-17

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.