Hey guys quick question, I have an entry that I put in my database, and as I echo the value, the value in the database stays the same while the data echoed keeps increasing, which is messing up my function. If anyone knows whats going down, would appreciate any suggestions.开发者_C百科
<?php
include("../includes/connection.php");
$query="SELECT * FROM points LEFT JOIN users ON points.user_id=users.id WHERE points.topic_id='82' AND users.username='gman'";
$check=mysql_query($query);
while ($row=mysql_fetch_assoc($check)){
$points_id=$row['points_id'];
echo $timestamp=$row['timestamp'];
}
?>
There were duplicate fields, so it was selecting all over the place. I changed the select * to select points.points_id,points.timestamp
精彩评论