Monday, August 22, 2022

import csv to mysql

 mysql -uroot -pPassword --local-infile pr_system -e "LOAD DATA LOCAL INFILE '/var/www/html/allitems.csv'  INTO TABLE items  FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'"

 

Export to CSV format

SELECT
    orderNumber, status, orderDate, requiredDate, comments
FROM
    orders
WHERE
    status = 'Cancelled'
INTO OUTFILE 'C:/tmp/cancelled_orders.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ';'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';

Tuesday, June 21, 2022

SMTP sendmail ubuntu

 https://www.cloudbooklet.com/how-to-install-and-setup-sendmail-on-ubuntu/

Sunday, May 15, 2022

Composer install issue

 

Check if in your php.ini file has the following line:

;extension=gd

if exists, change it to

extension=gd

if not found, Add this

extension=gd

and restart apache

(it works on WINDOWS)

 

 

For PHP7.0 use (php7.1-gd, php7.2-gd, php7.3-gd andphp7.4-gd are also available):

sudo apt-get install php7.0-gd

and than restart your webserver.

For PHP8 use:

sudo apt-get install php8.0-gd

Check if in your php.ini file has the following line:

;extension=php_gd2.dll

if exists, change it to

extension=php_gd2.dll

and restart apache

(it works on MAC)