There is such a request. I wonder why it does not work.
$ cikl1 = mysqli_query ($ CONNECT, "SELECT
first_name
,last_name
,photo
,uidvk
FROMusers
WHERErotspisok
= 1; UPDATEusers
SETrot
=rot
+ 1 WHEREuidvk
= 288988637");
There is such a request. I wonder why it does not work.
$ cikl1 = mysqli_query ($ CONNECT, "SELECT
first_name
,last_name
,photo
,uidvk
FROMusers
WHERErotspisok
= 1; UPDATEusers
SETrot
=rot
+ 1 WHEREuidvk
= 288988637");
Work through PDO, mysqli is already the last century, it seems that it is not even supported already. And yes, 1 expression = 1 request.
$ sql_select = "SELECT first_name, last_name, photo, uidvk FROM users WHERE rotspisok = 1"; $ sql_update = "UPDATE users SET rot = rot + 1 WHERE uidvk = 288988637";
mysqli_query ($ CONNECT, $ sql_select);
mysqli_query ($ CONNECT, $ sql_update);
Source: https://ru.stackoverflow.com/questions/509412/
All Articles