D
D
dima_ikar2019-05-26 00:30:18
PostgreSQL
dima_ikar, 2019-05-26 00:30:18

How to configure PHP file to work with PostgreSQL instead of MYSQL?

we have a configuration file

<?php
return [
  'db' => [
    'driver' => 'Pdo',
    'dsn' => 'mysql:dbname=dddddd; host=111.111.111.115',
    'username' => 'nnnnnnn',
    'password' => 'fffffff',
    'driver_options' => [
      PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
    ],
  ],
  'service_manager' => [
    'factories' => [
      'dbAdapter' => \Zend\Db\Adapter\AdapterServiceFactory::class,
    ],
  ],
];

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dima_ikar, 2019-05-26
@dima_ikar

doesn't work
any more suggestions

L
longclaps, 2017-06-03
@IndusDev

Then, that '0' == 48, and the indexing of the ndigit array (like any other) starts from zero.

D
Dmitry, 2017-06-03
@TrueBers

In my mind, it's done like this:

#include <ctype.h>

if( isdigit( c ) )
  ++ndigit[c - '0'];
else if( isspace( c ) )
  ++nwhite;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question