Category Archives: PHP

This is my solution to avoid constraint violation when you use Soft Delete Here is an interesting article that explain how unique index are treated by DB The field deletedAt as Datetime with NULL value can’t be part of … Continue reading

Posted on by gherardobertini | Leave a comment

SQL Access Equivalent MySQL Limit X, Y

In MySQL for paging a query we use SELECT * FROM {table} LIMIT X, Y In Access there is only SELECT TOP Y * FROM {table} to select first Y records of a query We can use this trick: First … Continue reading

Posted in Access, PHP, SQL | Tagged , , , , | Leave a comment

PHP JQuery – Trick Ajax external site (cURL)

Here is a way to call through Ajax an external link we use curl in a PHP function to read external url and print result in a Dialog Box example.html wrapper.php

Posted in JQuery, PHP | Tagged | 2 Comments

PHP transform array to an HTML table

PHP transform array to an HTML table Example with MySQL Results name surname city Kobe Bryant Los Angeles Mike Smith New York Mark Anthony Chicago Dave Sullivan San Francisco

Posted in PHP | Tagged , , | Leave a comment

PHP Excel – array to excel

Passing an Array ($_SESSION[‘excel_report’]) It creates a PhpExcel Notes: You should put the PHP Excel Library in “/utils/PHPExcel” folder otherwise you should change below

Posted in PHP, Php Excel | Tagged , , | 1 Comment