![]() |
mySQL User Name query?
What is the correct way to query a vBulletin database to see if a user name already exists? I just need to put together a simple php script that will return one value if the username is free or another if the user name already exists.
Thanks for your help, James |
[sql]SELECT userid FROM user WHERE username = "the username to check"[/sql]
If it returns anything, then the user exists. Remember TABLE_PREFIX and escaping the username. |
Thanks for the quick response.
Does vBulletin use addslashes() before adding user names to the database? So I should use stripslashes()? Or is there another function to use? Thanks, James |
Highly unlikely. The only escaping it usually does is for HTML (which IMHO it shouldn't do because it assumes a web front end other than something like XML or a custom application--both of which my site uses).
|
All times are GMT. The time now is 11:56 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|