find_package(OpenGL REQUIRED)
#...
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets OpenGL)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets OpenGL)
#...
target_link_libraries(YourProjectName PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::OpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
basic_ostream& operator<<(
std::basic_ostream<CharT,Traits>& (*func)(std::basic_ostream<CharT,Traits>&) );
CREATE TABLE m (
id INTEGER(11) NOT NULL AUTO_INCREMENT,
u_from INTEGER(11) NOT NULL,
u_to INTEGER(11) NOT NULL,
PRIMARY KEY USING BTREE (id)
) ENGINE=InnoDB
AUTO_INCREMENT=8 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
;
INSERT INTO `m` (id, u_from, u_to) VALUES
(1,7,1),
(2,7,1),
(3,7,1),
(4,7,1),
(5,1,7),
(6,1,4),
(7,4,1);
COMMIT;
select
max(id) id,
if(u_from = 1, concat('TO ', u_to), concat('FROM ', u_from)) last_msg,
u_from,
u_to
from m
where u_from = 1 or u_to = 1
group by if(u_from = 1, u_to, u_from)
order by id
var_dump($mysqli->error);
$stmt = $mysqli->prepare("INSERT INTO `masters` (`id`, `email`, `password`, `name`, `login`, `phone_number`, `rating`,
`avatar`, `photo1`, `photo2`, `photo3`, `photo4`, `photo5`, `town`, `area`) VALUES (NULL, ?,
?,?,?,?, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)");
$stmt->bind_param("sssss", $email, $password, $name, $login, $phone) ;
$stmt->execute();
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$data = file_get_contents('php://input');
//И вы его можете сохранить
file_put_contents('path/to/catalog/on/server/file.bin', $data);
$fileData =( $_FILES['my_file'] ?? null);
if (!$fileData) {
echo 'No file!';
exit;
}
$success = move_uploaded_file($fileData['tmp_name'], 'path/to/catalog/on/server/file.bin');
var_dump($success); // -> true or false