I have it
$sql = 'SELECT * FROM tb_event WHERE DATE(edate) >= DATE(NOW())';
$result = $conn->query($sql) or die(mysqli_error());
$news = $result->fetch_assoc();
which works great however when i change this to
$sql = 'SELECT * FROM tb_event WHERE DATE(edate) >= DATE(NOW() LIMIT 2)';
I get this error message
Warning: mysqli_error() expects exactly 1 parameter, 0 given in /var/www/.../...php
Finally, I would like to combine it with the order of something like this
$sql = 'SELECT * FROM tb_event WHERE DATE(edate) >= DATE(NOW() LIMIT 2 ORDER BY DESC)';
what am I doing wrong?
Ilias source
share