Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Guest RSS-Bot

Важное с Sysman.Ru: IPB 2.x + MySQL 5.x

Recommended Posts

Guest RSS-Bot

Song: Симтомы:

 

Цитата
Код ошибки: 1101

Сообщение сервера: BLOB/TEXT column 'field_1' can't have a default value

IP Адрес клиента:

Запрос: ALTER TABLE ibf_pfields_content ADD field_1 text default ''

 

Исправление:

Найти:

Цитата (ips_kernel/class_db_mysq.php)
    [color=green]/*-------------------------------------------------------------------------*/[/color]    [color=green]// ADD FIELD[/color]    [color=green]/*-------------------------------------------------------------------------*/[/color]        [b]function[/b] sql_add_field( [color=#048284]$table[/color], [color=#048284]$field_name[/color], [color=#048284]$field_type[/color], [color=#048284]$field_default[/color]="''" )    {        [color=#048284]$this[/color]->query( "ALTER TABLE ".[color=#048284]$this[/color]->obj['sql_tbl_prefix']."{$table} ADD $field_name $field_type default {$field_default}" );    }

Заменить на:

    [color=green]/*-------------------------------------------------------------------------*/[/color]    [color=green]// ADD FIELD[/color]    [color=green]/*-------------------------------------------------------------------------*/[/color]        [b]function[/b] sql_add_field( [color=#048284]$table[/color], [color=#048284]$field_name[/color], [color=#048284]$field_type[/color], [color=#048284]$field_default[/color]="''" )    {        [color=#048284]$this[/color]->query( "ALTER TABLE ".[color=#048284]$this[/color]->obj['sql_tbl_prefix'].[color=#048284]$table[/color]." ADD $field_name $field_type".( ( strtolower([color=#048284]$field_type[/color]) != 'text' ) ? " default ".[color=#048284]$field_default[/color] : "") );    }

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...