Hi.

On Thu, May 02, 2002 at 08:13:26AM +0200, [EMAIL PROTECTED] wrote:
> No i don't mean that, i mean a field that the user can assign a value to 
> it or not (optional) or a field that the user must set a value for it 
> (Mandatory) .

That is exactly what I understood you want. Either I misunderstood you
again or you are missing my point.

With MySQL, to get a field mandatory, you must not allow NULL values
(therefore "NOT NULL) and forbid to use the DEFAULT value, if no value
is assigned (that is what DONT_USE_DEFAULT_FIELDS is for).

Then, and only then, MySQL will generate an error if field is left out
on an INSERT.

If I misunderstood you, you should elaborate by an full example,
including what you get (falsely) and what you would expect.

Regards,

        Benjamin.


[...]
> >If you mean that you want a query to fail, if a specific field is not
> >specifed, you to declare the columns NOT NULL and have to compile
> >mysqld with DONT_USE_DEFAULT_FIELDS as explained here:
> >http://www.mysql.com/doc/I/N/INSERT.html and
> >http://www.mysql.com/doc/c/o/configure_options.html

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to