Jump to content

Select * users question


Eggzorcist

Recommended Posts

I have a question concerning outputting information taken out of the database.

 

Query is as follows:

 

$query = "SELECT * FROM users";
	$results = $this->db->query($query);
	$result = $results->fetch_assoc();

	return $result['username'];

 

 

The value that returns is the first username in the database. But here I am selecting all the usernames, can I select others ones with the fetch_assoc?

Link to comment
https://forums.phpfreaks.com/topic/237007-select-users-question/
Share on other sites

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.