DESCRIBE SELECT `package__packages_pickup`.*, `package__unit_manager_units`.`title` as unit_title, `package__profiler`.`display_name`, `package__packages_pickup_courier`.`name` as courier_name
FROM (`package__packages_pickup`)
JOIN `package__profiler` ON `package__profiler`.`id_user` = `package__packages_pickup`.`id_user`
LEFT JOIN `package__unit_manager_units` ON `package__unit_manager_units`.`id` = `package__packages_pickup`.`id_unit`
JOIN `package__packages_pickup_courier` ON `package__packages_pickup_courier`.`id` = `package__packages_pickup`.`id_courier`
WHERE `id_status` = 2
ORDER BY `date_created` desc
log_slow_queries=/var/lib/mysql/slowqueries.log
long_query_time=2
ALTER TABLE yourtable ADD FULLTEXT ft_index_name (description);
//When querying
MATCH(description) AGAINST ('dogs')
php_value xdebug.remote_enable 1
php_flag xdebug.profiler_enable
php_value xdebug.remote_host 192.168.1.117 #your ip
php_value xdebug.idekey "netbeans-xdebug"
php_value xdebug.profiler_output_dir /mnt/user_homes/Gustavo.Simon/httpdocs/cp/logs/profiler
foreach ($userList as $user) { //evil
$query = 'INSERT INTO users (first_name,last_name) VALUES("' . $user['first_name'] . '", "' . $user['last_name'] . '")'; mysql_query($query); }
$userData = array();
foreach ($userList as $user) { //good
$userData[] = '("' . $user['first_name'] . '", "' . $user['last_name'] . '")';
}
$query = 'INSERT INTO users (first_name,last_name) VALUES' . implode(',', $userData);
mysql_query($query);
$description = strip_tags($_POST['description']);
echo $description;
$path = "img/yourasset.pgn"; header("Cache-Control: private, max-age=86400, pre-check=86400"); header("Pragma: private"); header("Expires: " . date(DATE_RFC822,strtotime("+40 week"))); if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($path))) { // send the last mod time of the file back header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($path)).' GMT', true, 304); exit; } header("Content-type: image/png"); header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($path)) . ' GMT'); echo file_get_contents($path);
<ifmodule mod_headers.c="">
<filesmatch "\.(jpg|jpeg|png|gif|swf)$"="">
Header set Cache-Control "max-age=604800, public"
</filesmatch>
<filesmatch "\.(js|css|swf)$"="">
Header set Cache-Control "max-age=604800"
</filesmatch>
</ifmodule>
<IfModule mod_headers.c>
Header unset Cookie
Header unset Set-Cookie
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
<Files favicon.ico>
ExpiresDefault "access plus 12 months"
</Files>
</IfModule>
AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript text/plain text/html
body {background: url(data:image/png;base64,/9j/4AAQSkZJRgABAgAAZABkAD/2wAAY[...]
}
base64_encode(file_get_contents($path));