13. 8. 2009
Zobraziť článok How to reset root password?
pkill mysqld
mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set Password=PASSWORD('my_pass') where user='root';
flush privileges;
exit;
Create database and grant user
mysql -u root -p
my_password
create database my_db;
grant all privileges on my_user.* to 'my_db'@'localhost' identified by 'my_pass';
Import sql file
use mydatabase
source filename.sql
Export/Import database
mysqldump -u username -ppassword database_name > dump.sql
mysql -u username -ppassword database_name < dump.sql
Zobraziť článok
6. 7. 2009
Zobraziť článok Pri datetime v php
date("Y-m-d H:i:s")
alebo dať
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
Zobraziť článok
6. 7. 2009
Zobraziť článok www.nawebe.net -> nawebe.net
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.nawebe.net [NC]
RewriteRule ^(.*)$ http://nawebe.net/$1 [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?v=$1 [PT,L,QSA]
nawebe.net -> www.nawebe.net
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nawebe.net [NC]
RewriteRule ^(.*)$ http://www.nawebe.net/$1 [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?v=$1 [PT,L,QSA]
Odstrániť lomku
RewriteCond %{HTTP_HOST} ^www.example\.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
Zobraziť článok
28. 10. 2007
Zobraziť článok /* Copyleft 2005 Tibor Kádek */
function showhide(id)
{
el = document.getElementById(id);
el.style.display = (el.style.display=='block')?'none':'block';
}
usage:
<p id="produkt1" style="display:none">Some Show/Hide text</p>
<a href="javascript:showhide('produkt1');">more info</a>
Zobraziť článok