
22.03.2021, 10:48
|
|
Участник форума
Регистрация: 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
|
|
|