Welcome Guest, Not a member yet? Register   Sign In
Getting a users name from id
#3

[eluser]mattpointblank[/eluser]
Presumably you have a table with blog posts and a table of users. The blog posts table should have a field called 'user_id' which corresponds to the 'id' field in the users table. When you query the database to get the blog posts, you need to 'join' those two tables together, so you can get the user's name (or whatever else you store in the users table).


Messages In This Thread
Getting a users name from id - by El Forum - 04-26-2010, 05:15 AM
Getting a users name from id - by El Forum - 04-27-2010, 12:15 AM
Getting a users name from id - by El Forum - 04-27-2010, 02:20 AM
Getting a users name from id - by El Forum - 04-28-2010, 01:02 PM
Getting a users name from id - by El Forum - 04-28-2010, 02:26 PM
Getting a users name from id - by El Forum - 04-28-2010, 02:42 PM
Getting a users name from id - by El Forum - 04-29-2010, 04:22 AM
Getting a users name from id - by El Forum - 04-29-2010, 04:50 AM
Getting a users name from id - by El Forum - 04-29-2010, 12:15 PM
Getting a users name from id - by El Forum - 04-29-2010, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB