从数据库中选择数据而无需刷新php中的页面

时间:2018-06-29 07:50:25

标签: javascript php jquery mysql ajax

enter image description here从数据库中获取数据时,它会警告0000:00:00,而在数据库中插入写入日期时

<?php
  $query = "select * from Reply t1 inner join users t2 on t1.UserId = t2.UserId where comment = '$commentid'";
  $run1 = mysqli_query($mysqli,$query);
  $numberRows = mysqli_num_rows($run1);
  while($row1 = mysqli_fetch_array($run1))
  {
    $Reply = $row1['Reply'];
    $UserId = $row1['UserId'];
    $UserName = $row1['UserName'];

    $date1 = $row['Date'];
    echo "<script>alert('$date1')</script>";

    $ageDate1 = time_elapsed_string($date1);
    echo "<script>alert('$ageDate1')</script>";
?>

0 个答案:

没有答案