Hi there ;)
Im building a MySQL table for a menssaging system, its a table that has 3
fields de UserID, MTime and Mess.
My problem is that i cant find a way that using only a mysql query i get the
time and the message, and that for each row.
Basicly the code would look like this, to give an idea...
<?php
$News=mysql_que ry("SELECT MTime,Mess FROM Star_Mess WHERE UserID = '$UID'
ORDER BY MTime DESC");
while ($line = mysql_fetch_arr ay($News, MYSQL_ASSOC)) {
foreach ($line AS $Date) {
print "\t\t<p><b>$Dat e</b></p><p>$Mess</p>\n";
}
}
?>
Any ideas how to do it ?
The main look of the thing is to have the Time in bold followed by the
message, and that for each row.
Thx
Marco
Im building a MySQL table for a menssaging system, its a table that has 3
fields de UserID, MTime and Mess.
My problem is that i cant find a way that using only a mysql query i get the
time and the message, and that for each row.
Basicly the code would look like this, to give an idea...
<?php
$News=mysql_que ry("SELECT MTime,Mess FROM Star_Mess WHERE UserID = '$UID'
ORDER BY MTime DESC");
while ($line = mysql_fetch_arr ay($News, MYSQL_ASSOC)) {
foreach ($line AS $Date) {
print "\t\t<p><b>$Dat e</b></p><p>$Mess</p>\n";
}
}
?>
Any ideas how to do it ?
The main look of the thing is to have the Time in bold followed by the
message, and that for each row.
Thx
Marco
Comment