How do I output all entries of the column in mysql?

0 like 0 dislike
4 views
I'm just starting to understand php, I do not really understand how to pull all records from one column, there is a piece of code from dB which should fetch and print the records from this column, namely the name of those who to be there, but for some reason it only displays one entry from a column, that I can not finished ?

$result=DB::query("SELECT * FROM `mg_hoax` order by `fio`"); $user_new = $result->fetch_assoc(); echo $user_new;
Summary: Ivanov Ivan Иванович1 (such in column three)

You need to add to output all the names ?
by | 4 views

1 Answer

0 like 0 dislike
to read the documentation ) $user_new array, bypassing the loop and bring
$result = $c->query('SELECT user,host FROM mysql.user'); while ($row = $result->fetch_assoc()) { printf("'%s'@'%s'\", $row['user'], $row['host']); }


Retrieves a result row as an associative...
by

Related questions

0 like 0 dislike
5 answers
0 like 0 dislike
1 answer
asked Apr 9, 2019 by ART4
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
32,930 users