We should use the following statement to calculate one day ago date time using MySQL:
SELECT NOW() - INTERVAL 1 DAY;
We should use the following statement to calculate one day ago date time using MySQL:
SELECT NOW() - INTERVAL 1 DAY;
The following select query returns next auto increment value:
SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = "db_name" AND TABLE_NAME = "table_name"
UPDATE your_table SET url = REPLACE(url, 'test/1', 'test/2') WHERE url LIKE '%test/1%'
Example usage is like the following:
CREATE TABLE persons( id INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, surname CHAR(30) NOT NULL, gender ENUM('male','female','unisex') NOT NULL, PRIMARY KEY (id,gender) ); INSERT INTO persons(name,surname,gender) VALUES('erman','gülhan','male'),('ayşe','dolu','female'),('ali','veli','male'); # this returns gender as string SELECT name,gender FROM persons; # this returns gender as numeric index SELECT name,gender+0 FROM persons;
CREATE DATABASE mydb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
[mysqld] init_connect='SET collation_connection = utf8_unicode_ci' init_connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake
shell> ./configure --with-charset=utf8 --with-collation=utf8_general_ci
HTML tarafında utf-8 desteği için:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />