Try the following SQL: SELECT count("Names") FROM Customers WHERE "Names" = ?
If the result is zero, the name was not in the database.
If you are sure that there are no duplicate names in the database, you could assign the result of the query directly to $duplicate: ($duplicate) = $sth->fetchrow_array and drop the whole while loop.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Database stuff
by CountZero
in thread Database stuff
by Raziel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |