mysql - php mysqli query not returning all the rows in a table -


i have mysql table called comments contains column called vz_comments , want show comments related character_id. current query shows 1 comment when put statement phpmyadmin shows comments.

$comments_query = $conn->query("select vz_comments comments character_id='$comment_id'");  $comments_array = $comments_query->fetch_array();  echo $comments_array['vz_comments']; 

fetch_array fetches a single row array of columns (either numeric or associative, depending on parameters. default, mysqli_both used, retrieving array attributes of both styles.

to fetch entire result in single call, should use fetch_all instead.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -