Re: primary field

From: Date: Fri, 16 Feb 2001 22:59:13 +0000
Subject: Re: primary field
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-6700@lists.php.net to get a copy of this message
I'm sorry I made a mistake here. You can't make double posts. Jayme. -----Mensagem Original----- De: JJeffman <jjeffmanweb@conex.com.br> Para: <php-db@lists.php.net> Enviada em: sexta-feira, 16 de fevereiro de 2001 19:46 Assunto: Re: [PHP-DB] primary field > No it hasn't. The field order in the form doesn't matter, but the order you > use their values in the query yes ! > > I don't know what kind of operation you're making on the database > updating, inserting, etc. ). > > If you are inserting you must not give any member_id, as long as it is > generated by the database server. As you won't attribute any value to > member_id you must tell which fields you are inserting : "insert into table > (last_name) values('$lastName')" this way you'll get no errors, at least if > last_name is not a unique key . > > If you is updating data you can't modify the member_id which is the table > primary key. > > HTH. > > Jayme. > > -----Mensagem Original----- > De: Marc Bragg <msbjustice@mindspring.com> > Para: <php-db@lists.php.net> > Enviada em: sexta-feira, 16 de fevereiro de 2001 17:55 > Assunto: [PHP-DB] primary field > > > > Does the first field in a form have special significance? > > Have two fields in table: > > > > last_name > > member_id > > > > member_id is key and autoincrement. > > > > mysql won't accept two last names as same when last_name is first field. > > > > when member_id is made first field, then can input same last name into > > last_name field. > > > > why is that? > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#6700) next »