[GLLUG] [ot]MySQL/PHP
Ben Pfaff
blp@cs.stanford.edu
27 Feb 2002 20:14:12 -0800
Mike Szumlinski <szumlins@msu.edu> writes:
> I'm new to the whole MySQL/PHP thing so bear with me on all of this.
>
> Now what would be the best way to inform the user if they did duplicate the
> address (ie, the server wouldn't accept the INSERT, but how does the user
> know it didn't?)
Normally the API function to submit the query will return an
error code. I've never used PHP though so don't know how they
implement it.
> On 2/27/02 9:56 PM, "Ben Pfaff" <blp@cs.stanford.edu> wrote:
>
> > I would just make the email column UNIQUE in the database schema,
> > so that an attempt to insert a duplicate row would be rejected
> > automatically by the database server.
--
"To prepare for the writing of Software,
the writer must first become one with it,
sometimes two."
--W. C. Carlson