Jump to content

php mysql select column


wannabe_god

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...