Hi! Could we please enable some services and cookies to improve your experience and our website?
create table table1 as
select
'tree' as column1,
29012 as column2,
'foggy' as column3
union
select
'tree',
203943,
'rainy';
select
*
from
table1;
<?php
use Carbon\Carbon;
$now = Carbon::now()->format('d/m/Y');
printf("Today is %s\nCurrent PHP version: %s \n\n", $now, phpversion());
$query = 'SELECT column1, column2, column3 from table1 where column1 = "tree"';
$pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
// get DB version using PDO
$stmt = $pdo->prepare($query);
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($row, JSON_PRETTY_PRINT);