php - My request to mysql database doesn't work properly -
this question has answer here: how mysqli error in different environments? 1 answer i newbie in php+mysql , learn myself. got problem (i suppose may simple , stupid) can't fix it. ok. want select record database: use function connect database: function connect_bd() { $result = new mysqli('localhost', 'root', '*****', 'book_kz'); if (!$result) { return false; } else{ $result->autocommit(true); return $result; } } it works properly. wrote verification function: function log_in($user_name, $passwrd) { // verification of user's name , password in database // if yes - return true // otherwise - false // connect database $connect = connect_bd(); if (!$connect) { return 0; } // verification procedure $result = $connect->query("select * admin user_na...