This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- import | |
CREATE DATABASE IF NOT EXISTS import_csv; | |
USE import_csv; | |
CREATE TABLE IF NOT EXISTS persons ( | |
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
`firstname` TEXT NOT NULL, | |
`lastname` TEXT NOT NULL, | |
`age` INT NOT NULL | |
); | |
LOAD DATA INFILE 'data.csv' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$con = new PDO("mysql:host=localhost;","root",""); | |
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$username = "John Doe"; | |
$password = "abc123"; | |
// CREATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# htaccess starter template | |
# v20121004 htaccessbook.com/changelog | |
# Enable mod_rewrite | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
</IfModule> | |
# Enable symbolic links | |
Options +FollowSymLinks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* .htaccess writer CRUD class | |
* | |
* @author Lawrence Cherone | |
* @version 1.00 | |
*/ | |
class htaccessCRUD | |
{ | |
public $file; |