Xtremer360 Posted November 24, 2009 Share Posted November 24, 2009 Say I have: $query="SELECT h.password as password,h.enabled as enabled FROM efed_handler as h WHERE h.login='$uname' and h.fed_id='$fedid'"; I'm about to create the tables in my database and know obviously that the name of one of my tables need to be called efed_handler. Little confused on the row names though. Quote Link to comment https://forums.phpfreaks.com/topic/182727-confusion-on-row-names/ Share on other sites More sharing options...
Yesideez Posted November 24, 2009 Share Posted November 24, 2009 That can be simplified to: $query="SELECT password,enabled FROM efed_handler WHERE login='$uname' and fed_id='$fedid'"; "password", "enabled", "login" and "fed_id" would be your column names. There's nothing wrong with the way you had it originally but you only need to specify the table names before column names when you're accessing more than one table at the same time. Quote Link to comment https://forums.phpfreaks.com/topic/182727-confusion-on-row-names/#findComment-964619 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.