Показать сообщение отдельно
Старый 08.02.2013, 07:50   #25
pax
Unity/C# кодер
 
Аватар для pax
 
Регистрация: 03.10.2005
Адрес: Россия, Рязань
Сообщений: 7,568
Написано 3,006 полезных сообщений
(для 5,323 пользователей)
Ответ: Добавить запись если не существует.

В общем решил отказаться от Enum вот почему:
http://www.mysqlperformanceblog.com/...hat-is-faster/
The problem we had with ENUM-fields; When we wanted to add a ‘type’ to an ENUM-field (or change the definition of the field in any way), MySQL often did a complete rewrite of that table. For some of our bigger tables (think tens of millions of records), this could take up to a few hours sometimes, which meant downtime. So for a few cases we decided to switch from ENUM’s to TINYINT’s because this eliminates the need for a change in table definition.
и пришел к выводу что лучше сделать в php вот так:
$config = array(
        ...,
        
'user_params' => array(
            
'frags' => 1,
            
'deaths' => 2,
            
'wins' => 3,
            
'fails' => 4,
            
'xp' => 5,
            
'money' => 6,
            
'golds' => 7
        
),
       ); 
и поле объявить как tinyint
__________________
Blitz3d to Unity Wiki

Последний раз редактировалось pax, 08.02.2013 в 10:24.
(Offline)
 
Ответить с цитированием