Jump to content

Selecting column values.


Imtehbegginer

Recommended Posts

Is the user(admin) to have an 'accesslevel' associated with him/her which allows them access to certain information in the database or are you looking to retrieve all database rows where a column called 'accesslevel' has a value of 300?

If it is the latter then you will need something like:

$result = mysql_query("select * from table_name where accesslevel = 300");
while($row = mysql_fetch_array($result)) {
// reference either the column name: $row['email'] or column number: $row[0]
echo $row['column_0'];
echo $row['column_1'];
echo $row['column_2'];
echo $row['column_3'];
}

If provide more information I can probably be of more assistance.

Cheers,

Fezzik

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.