It's exactly as the error states as you're passing arguments to mysqli_query()
incorrectly. Assuming $conn
is your mysqli connection generated at some point by new mysqli()
it should be:
$result = mysqli_query( $conn,$sql) or trigger_error(mysqli_error($conn)));
The way you were calling it you were passing a string, $sql
as the first argument.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…