Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
CREATE TABLE gugus ( ID int NOT NULL, fk_untersuchungen int NULL ); INSERT INTO gugus (id, fk_untersuchungen) VALUES (1, NULL); SELECT id, fk_untersuchungen FROM gugus WHERE id = 1;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php // Run query using mysqli $query = "SELECT id, fk_untersuchungen FROM gugus WHERE id = 1;"; $result = $mysqli->query($query); $obj = $result->fetch_object(); print_r($obj); //echo $obj->id; //echo $obj->fk_untersuchungen; //$minuten_vorher = 0; $minuten_vorher += $obj->fk_untersuchungen; //$minuten_vorher += 10; $minuten_vorher = $minuten_vorher * 60; $start = "2023-03-23 10:00:00"; echo "\n".date('Y-m-d\TH:i:s', strtotime($start) - $minuten_vorher); echo "\n".$minuten_vorher; $id = "1"; $ids = explode("|",$id); for($i = 0; $i < count($ids); $i++){ echo $ids[$i]; }
Copy Clear