Показать сообщение отдельно

  #3  
Старый 22.03.2021, 10:48
Livarka
Участник форума
Регистрация: 27.08.2017
Сообщений: 143
С нами: 4584912

Репутация: 83
По умолчанию

ты массив в запрос засунул,

code:





Код:
$session
=
$_SESSION
[
'id'
]
;
$stmt
=
$mysqli
-
>
prepare
(
"select * from accounts where uid = ?"
)
;
$stmt
-
>
bind_param
(
"i"
,
$session
)
;
$stmt
-
>
execute
(
)
;
$rows
=
$stmt
-
>
num_rows
;


Изучи это

PHP: mysqli_stmt - Manual

The mysqli_stmt class

www.php.net


А лучше это

(The only proper) PDO tutorial

There are many tutorials on PDO already, but unfortunately, most of them fail to explain the real benefits of PDO, or even promote rather bad practices. The only two exceptions are [phptherightway.com](http://www.phptherightway.com/#pdo_extension) and...

phpdelusions.net
 
Ответить с цитированием