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

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -