I have written a mysql_query
and it is not working.
I want to know the problem via mysqli_error()
however it gives the following error mysqli_error()
expects parameter 1 to be mysqli
my mysql code is as follows:
$connect = mysqli_connect("localhost","root", "", "tomuman");
$query = mysqli_query($connect, "SELECT id, to FROM messages WHERE read='0'");
and mysqli_error
as follows:
echo mysqli_error($query);
What could cause this problem?