wannabe_god Posted November 14, 2006 Share Posted November 14, 2006 I use php with mysql.I'm new to mysql, but everything works fine (mostly)Now i searched a way to show all users in the database, and as the function mysql_fetch_column doesnt exists, I thought of making an extra table with all users. However, i think i will encounter a problem like this often, so...... could someone help? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 14, 2006 Share Posted November 14, 2006 I'm not sure what the problem is. If you want to get one column from all rows, you can do something like this:SELECT column FROM tableBut I don't think that's your question. Clarify what you are wanting to do. Link to comment Share on other sites More sharing options...
reportingsjr Posted November 14, 2006 Share Posted November 14, 2006 Yes, I think that is what he wants. "SELECT `username` FROM `user_info`" then do anything like regular! Link to comment Share on other sites More sharing options...
jhecht Posted November 14, 2006 Share Posted November 14, 2006 Or you could use mysql_result... but i would advise staying away from that.the syntax however, would be something like : $sql = "SELECT * FROM table";$ans= mysql_query($sql) or die(mysql_error());$res= mysql_result($ans,0,'column') or die(mysql_error()); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now