PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table two (id int, key (id)); create table one (id int, foreign key (id) references two(id));
Copy Clear
Copy Format Clear
<?php $res = $mysqli->query("select 1 value union select 2 value"); echo $val = $res->fetch_assoc()['value']; echo $val = mysqli_result($res, 0, 'value'); function mysqli_result($search, $row, $field){ $i=0; while($results=mysqli_fetch_array($search)){ if ($i==$row){ $result=$results[$field]; } $i++; } return $result; }
Show:  
Copy Clear