Bisa dilihat di dalam id, nomor yang pada awalnya berurutan menjadi tidak berurutan. Ya mungkin ini tak masalah karena masing-masing telah mempunyai id yang berbeda. Tapi bagaimana jika ingin mengurutnya kembali memulai dari 0 - 6 (Sesuai data di atas)?
Ada beberapa cara diantaranya :
1. Menghapus field id dengan menggunakan perintah berikut :
ALTER TABLE nama_tabel DROP nama_field
2. Data id akan terhapus dan menyisakan field nama saja.
3. Buat perintah seperti ini dan jalankan.
ALTER TABLE nama_tabel ADD nama_field INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
How to Install PHP 7.4 on Ubuntu?. Welcome to today’s guide on how to install PHP 7.4 on Ubuntu 20.04/18.04/19.04/16.04 Linux. The PHP release7.4.0has been made available for the general public and for use in Production environments.
PHP is a popular server scripting language known for creating dynamic and interactive Web pages. PHP is widely-used programming language in the Web. Use the steps below to install PHP 7.4 on Ubuntu 20.04/19.04/18.04/16.04.
Install PHP 7.4 on Ubuntu 20.04
NOTE: Ubuntu 20.04 ships with PHP 7.4 in its upstream repositories. Just install it and the extensions you with the apt package manager.
PHP configurations related to Apache is stored in /etc/php/7.4/apache2/php.ini
Using PHP 7.4 with Nginx on Ubuntu:
The installation of php on Ubuntu configures Apache. For users interested in running Nginx and PHP, you need to stop and disable Apache service.
sudo systemctl disable --now apache2
Then install fpm extension and nginx packages.
sudo apt-get install nginx php7.4-fpm
Nginx and fpm services should be running.
$ systemctl status php7.4-fpmnginx
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-09-16 17:09:41 UTC; 27s ago
Docs: man:php-fpm7.4(8)
Main PID: 25321 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2362)
CGroup: /system.slice/php7.4-fpm.service
├─25321 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─25339 php-fpm: pool www
└─25340 php-fpm: pool www
Sep 16 17:09:41 ubuntu18 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Sep 16 17:09:41 ubuntu18 systemd[1]: Started The PHP 7.4 FastCGI Process Manager.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-09-16 17:09:42 UTC; 6min ago
Docs: man:nginx(8)
Main PID: 25441 (nginx)
Tasks: 2 (limit: 2362)
CGroup: /system.slice/nginx.service
├─25441 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─25442 nginx: worker process
Sep 16 17:09:42 ubuntu18 systemd[1]: Starting A high performance web server and a reverse proxy server…
Sep 16 17:09:42 ubuntu18 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Sep 16 17:09:42 ubuntu18 systemd[1]: Started A high performance web server and a reverse proxy server.
PHP FPM configuration file is /etc/php/7.4/fpm/pool.d/www.conf.
If your web server is running on the same computer as multichaind, you can skip the rest of this section. Otherwise:
multichain-cli chain1 stop
Then add this to ~/.multichain/chain1/multichain.conf:
rpcallowip=[IP address of your web server]
Then start MultiChain again:
multichaind chain1 -daemon
Configure the Web Demo
This section assumes your blockchain is named chain1 and you are running the node and web server on a Unix variant such as Linux. If not, please substitute accordingly.
Make your life easy for the next step by running these on the node's server:
In the web demo directory, copy the config-example.txt file to config.txt:
cp config-example.txt config.txt
In the demo website directory, enter chain details in config.txt e.g.:
default.name=Default # name to display in the web interface
default.rpchost=127.0.0.1 # IP address of MultiChain node
default.rpcport=12345 # usually default-rpc-port from params.dat
default.rpcuser=multichainrpc # username for RPC from multichain.conf
default.rpcpassword=mnBh8aHp4mun... # password for RPC from multichain.conf
Multiple chains are supported by the web demo by copying the same section again but with different prefixes before the period, for example:
another.name=...
another.rpchost=...
...
Note that the config.txt file is readable by users of your web demo installation, and contains your MultiChain API password, so you should never use this basic setup for a production system.