I'm querying the timestamp from the field created in the table messages.
My database table currently stands as..
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| msg_id | messages | uid_fk | ip | created | uploads |
| 706 | ........ | 39 | .. | 1368631445 | 0 |
| 717 | ........ | 39 | .. | 1368640802 | 0 |
| 705 | ........ | 39 | .. | 1368631238 | 0 |
| 696 | ........ | 39 | .. | 1368595705 | 0 |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is how I'm querying the timestamp from created.
public function Time_Stamp($uid){
$res = mysql_query("SELECT created FROM messages WHERE uid_fk='$uid'");
while ( $row = mysql_fetch_array($res) ) {
echo date("g:i", strtotime($row["created"])) . "<br />";
}
}
----- Output -----
- 9:00
- 9:00
- 9:00
- 9:00 So basically just printing out in a list the same time.
It's not printing their unique time from the created field. I'm not so perfect with MySQL but It has do to with their unique iD's(either msg_id, uid_fk) also, $uid equals the uid_fk, $uid is defined in another table.
How do I go about bringing their specific iD's to print out their correct timestamp.