Hey everyone,
My problem is this. I'm building php forums, and, for site-specific reasons, users on the forums can have one 'main' name, their username which they register with, and also as many 'extra' names as they want.
For use on the forums, both the username and any extra names can have customised icons and signatures for that name.
Like, a user named 'Alex' might have Alex.jpg as his icon, and some text as a signature. Alex, might also have 'AlexTheGreat' as an extra name, with AlexG.gif as his icon, and some text2 as a signature.
On the posting screen, a user can choose which name to post under from a drop-down list. The script which handles the post must be able to get the userID from the users table (in which usernames are stored), and either the name, icon and signature from the users table, OR the name icon and signature from the extra names table.
Is there any way to do this with just one query? My old script checked if the name entered was a username or an extra name, and then took the information from whichever table was appropriate, but that took three queries.
Is there a way to do it with one? Any help would be most appreciated.
The extra names are linked to their owner username by the userID field, by the way ..
Thanks in advance!
Alex ...