*Gastón Sancassano
>  mysql> CREATE TABLE Usuarios (Nombre TEXT NOT NULL,
>          -> Password TEXT NOT NULL,
>          -> Permiso INT(1),
>          -> PRIMARY KEY(Nombre(30)));
>
>  Query OK, 0 rows affected (0.05 sec)
>
>
> This allows me to insert things like:     INSERT INTO Usuarios
> (Nombre,Password) VALUES ('','');
>
> I need to force those fields to have at least one letter or number, not
> empty, nor space.
> Is there a way I can do this, at least having it not empty?.

No, you must do this in your application. There is currently no support for
such constraints in mysql, but there will probably be in version 4.x.

(Why do you use TEXT for Nombre and Password? CHAR or VARCHAR seems to be
more appropriate... also, INT(1) looks a little weird... you should use
TINYINT.)

--
Roger


---------------------------------------------------------------------
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