[thelist] sql for mailing list verify

NanHarbisonSmith at aol.com NanHarbisonSmith at aol.com
Fri Jul 26 05:07:01 CDT 2002

[ Picked text/plain from multipart/alternative ]
Hi David,
What I meant was that I did not use SQL to determine if the username was
already taken after selecting it using a SQL statement. Or maybe I mean that
I did not use a SQL statement where the statement directly tests for the
existence of the username, as Paul did. Sorry I did not make that point

> > -----Original Message-----
> > From: NanHarbisonSmith at aol.com
> > ........
> > I don't use SQL for this, I use PHP:
> >
> > //see if the username is already in the db
> > $Query1 = "SELECT USERNAME from $TableName where (USERNAME =
> > '$username')"; ........
> Nan, you must realize this:
> The string that reads "SELECT USERNAME from $TableName WHERE ..." is
> in fact............. SQL!!!
> SQL stands for Structured Query Language, and that's exactly what
> you're using even though you claim not to.  You are using SQL
> commands everytime you call a PHP function that starts with "mysql_"
> (like mysql_query, mysql_num_rows, mysql_fetch_array, etc., all of
> which YOU USED IN YOUR PHP CODE!)  So yes, you do use SQL for it.
> HTH,
> David Bindel

Nan Harbison Smith
481 Elm Street
Concord, MA 01742

Deja Moo -- the feeling that you've heard this bull before

More information about the thelist mailing list