PDA

View Full Version : mysql search?


MK1.0!
7-22-04, 02:27 PM
this is what i want 2 do
when some1 signs up it should automaticly check wether there user name is alreadynot there

mhellman
7-22-04, 02:53 PM
SELECT count(table.username) AS checkuser FROM table WHERE table.username = '$newuser'

if the value checkuser is > 0 the username already exists

MK1.0!
7-22-04, 03:12 PM
can any1 explain this in a bit more detail thanks

mitchind
7-22-04, 04:13 PM
mhellman provided the exact solution based on the detail you provided.

Just substitute your table and fieldname to match your database. If you need more details, you'll most likely have to provide more details yourself.