Changeset 31822


Ignore:
Timestamp:
May 19, 2017, 2:46:22 PM (7 years ago)
Author:
plg
Message:

compatibility MySQL 5.7, insert must not give empty id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMenuManager/amm_root.class.inc.php

    r28688 r31822  
    224224    if($id=='')
    225225    {
    226       $sql="INSERT INTO ".$this->tables['urls']." VALUES
    227             ('',
     226      $sql="INSERT INTO ".$this->tables['urls']." (label,url,mode,icon,position,visible,accessUsers,accessGroups) VALUES
     227            (
    228228             '".$label."',
    229229             '".$url."',
     
    430430    if($id=='')
    431431    {
    432       $sql="INSERT INTO ".$this->tables['personalised']." VALUES
    433             ('',
     432      $sql="INSERT INTO ".$this->tables['personalised']." (visible,nfo) VALUES
     433            (
    434434             '$visible',
    435435             '".$nfo."'
     
    462462      {
    463463        $values[]="('$id',
    464                     '".$lang['lang']."',
     464                    '".substr($lang['lang'],0,5)."',
    465465                    '".pwg_db_real_escape_string(stripslashes($lang['title']))."',
    466466                    '".pwg_db_real_escape_string(stripslashes($lang['content']))."')";
Note: See TracChangeset for help on using the changeset viewer.