开发者

Why is my mysql database timestamp changing by itself?

开发者 https://www.devze.com 2022-12-25 23:35 出处:网络
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 fun

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

0

精彩评论

暂无评论...
验证码 换一张
取 消