|
|
|
mysql принимает вставку без обязательного поля - почему?
|
|||
|---|---|---|---|
|
#18+
Код: sql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. несмотря на то, что у пасворда нету значения по умолчанию и стоит нот нул, база принимает такую вставку!!! почему? и вопрос в догонку, а как заставить базу не принимать вставку , если не задано поле, для которого нету значения по умолчанию??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.08.2013, 17:56:05 |
|
||
|
mysql принимает вставку без обязательного поля - почему?
|
|||
|---|---|---|---|
|
#18+
alex564657498765453несмотря на то, что у пасворда нету значения по умолчанию и стоит нот нул, база принимает такую вставку!!! вот к гадалке неходи, туда вставляется НЕ НУЛЛ а "" а происходит всё "в этом вашем пхп", примерно в таком виде Код: php 1. как, не врёт ХШ ? :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.08.2013, 18:01:08 |
|
||
|
mysql принимает вставку без обязательного поля - почему?
|
|||
|---|---|---|---|
|
#18+
http://dev.mysql.com/doc/refman/5.5/en/data-type-defaults.html For data entry into a NOT NULL column that has no explicit DEFAULT clause, if an INSERT or REPLACE statement includes no value for the column, or an UPDATE statement sets the column to NULL, MySQL handles the column according to the SQL mode in effect at the time: If strict SQL mode is enabled, an error occurs for transactional tables and the statement is rolled back. For nontransactional tables, an error occurs, but if this happens for the second or subsequent row of a multiple-row statement, the preceding rows will have been inserted. If strict mode is not enabled, MySQL sets the column to the implicit default value for the column data type. ... For string types other than ENUM, the default value is the empty string. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.08.2013, 18:21:27 |
|
||
|
|

start [/forum/topic.php?desktop=1&fid=47&tid=1836254]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
46ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
33ms |
get tp. blocked users: |
1ms |
| others: | 205ms |
| total: | 325ms |

| 0 / 0 |
