hi guys
ive been trying to work this out now for a couple hours
i am a beginner and i am just trying to learn
i am sending a query to the database
these are the 3 results of that query
now when i try to show them on the webpage i only get the first results using
the below code counts the row correctly and shows "3"
how do i get the query to show all results
Ip9one test
testing p3oto upload
test
?
thanks
ive been trying to work this out now for a couple hours
i am a beginner and i am just trying to learn
i am sending a query to the database
Code:
$query=mysql_query("SELECT message FROM messages WHERE uid_fk=1");
these are the 3 results of that query
now when i try to show them on the webpage i only get the first results using
Code:
<?php
include_once 'includes/db.php';
$query=mysql_query("SELECT message FROM messages WHERE uid_fk=1");
$data = mysql_fetch_array($query);
echo $data['message'];
the below code counts the row correctly and shows "3"
Code:
$query2 = mysql_query("SELECT message FROM messages WHERE uid_fk='1'");
$data2=mysql_num_rows($query2);
echo $data2
how do i get the query to show all results
Ip9one test
testing p3oto upload
test
?
thanks