0

i want to write a program to read the database, but i get an error like in the description. thank you

help me please, i'm just learning php "Fatal error: Uncaught TypeError: mysqli_error(): Argument #1 ($mysql) must be of type mysqli, string given in C:\xampp\htdocs\New folder\Meet 3\read.php:6 Stack trace: #0 C:\xampp\htdocs\New folder\Meet 3\read.php(6): mysqli_error('SELECT * FROM b...') #1 {main} thrown inĀ C:\xampp\htdocs\New folder\Meet 3\read.phpĀ on lineĀ 6" https://code.sololearn.com/w314Srjt7yI3/?ref=app

21st Jan 2022, 12:16 AM
Faish
2 Answers
+ 1
mysqli_error() requires a `mysqli` object as an argument, so it should be like this mysqli_error( $conn ) You had instead passed the query <$ql> (a string) as argument there, that's why you got that error message.
21st Jan 2022, 12:42 AM
Ipang
+ 1
thanks bro
21st Jan 2022, 5:04 PM
Faish