print_r($total);
и скинь сюда, посмотрим что там #docker-compose.yml
...
pgsql:
container_name: pgsql
image: 214.103.148.184:5000/pgsql
#image: pgsql-template
ports:
- 45433:5432
networks:
test_bridge:
ipv4_address: 180.20.10.1
...
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
370259cf00f5 214.103.148.184:5000/pgsql "/usr/lib/postgres..." 23 minutes ago Up 23 minutes 0.0.0.0:45433->5432/tcp pgsql
...
The from() method takes an optional second parameter with which a table alias can be specified.
$qb = $app['db']->createQueryBuilder();
$query = $qb
->insert('users')
->values(
array(
'user' => '?',
'value' => '?'
)
)
->setParameter(0, $name)
->setParameter(1, $value)
;
$query->execute();
А покажите код для SELECT который работает.
$query = $app['qb']
->select('*')
->from('users')
->where('user = :name')
->setParameter(':name', $name);
$userdata = $query->execute()->fetchAll();
Т.е. должно быть $app['db']->insert(...);
...
$app['qb'] = $app['db']->createQueryBuilder();
volumes:
- ./www:/var/www/html
;<?php
;die(); // For further security
;/*
[category]
name="value"
;*/
;?>