|
Posted by Smitro on 11/22/05 10:42
Jerry Stuckle wrote:
> Smitro wrote:
>
>> Hi all,
>>
>> I'm in the middle of building a new server up and converting current
>> web sites across. in this process I have moved to PHP 5 and MySQL 5. I
>> have just run into a problem with MySQL.
>>
>> I'm using phpMyAdmin to do the editing of tables. I cannot set a feild
>> to be Not Null. When I do, it runs the command without error but
>> doesn't change anything. I've tried with auto increment and without.
>> I'm just doing the simple way, editing the table then changeing the
>> drop down box, and it will not change.
>>
>> I thought maybe there was something wrong with my table, so I created
>> a test one, and the same thing happened. Any ideas? I'm scraching my
>> head, I've done this in the past without a problem.
>>
>> Smitro
>
>
> Smitro,
>
> Do you in fact have nulls in the column on any row?
>
> Null/Not Null is only a constraint on the column; changing it doesn't
> actually change the contents of that column. If you want to change to
> not null, you must first get rid of all null values in the column (i.e.
> UPDATE statement), then change the constraint.
>
I have tried it on a new table with no data and same problem.
Navigation:
[Reply to this message]
|