echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else
echo "sucess connect";
$query1 = "SELECT user_id,name,date,time_in,time_out FROM daily_oprations WHERE id = 11";
$result = mysqli_query($con,$query1);
if (! $result)
{
echo"<br>";
die("somthing wrong !");
}
echo"<ul>";
while ($row = mysqli_fetch_assoc($result)) {
echo"<li> the ID is :" . $row['id'] . "and the name is :" . $row['name'] . '</li>';
}
echo"</ul>";
mysqli_free_result($result);
mysqli_close($con);
?>
Please format the code you posted, by wrapping it in triple backticks. -> `
Check your Query Line 14
Instead of printing something wrong, use mysqli_error($con)) to print the query error returned by sql
Обсуждают сегодня