Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql store ip address

-- `ip_address` int(4) unsigned NOT NULL
INSERT INTO my_table (`ip_address`) VALUES (INET_ATON("127.0.0.1"));
SELECT INET_NTOA(ip_address) as ip FROM my_table;
-- php
<?php
var_dump(ip2long('123.63.153.253'));	-- 2067765757
var_dump(long2ip(2067765757));			-- "123.63.153.253"
?>
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql search table in all databases 
Sql :: create temporal table in sql 
Sql :: mysql email validation 
Sql :: mysql query dates between two dates 
Sql :: oracle case 
Sql :: import all databases mysql 
Sql :: mysql auto increment after delete 
Sql :: write sql query to find the second highest salary of employee 
Sql :: how to query without duplicate rows in sql 
Sql :: 1) PostgreSQL DESCRIBE TABLE using psql 
Sql :: check lock on table in sql server 
Sql :: eliminate zero from integer mysql 
Sql :: sql sum by column 
Sql :: how to extract only year and month from date in sql 
Sql :: oracle to_char number format percentage 
Sql :: incompatible sql_mode=only_full_group_by 
Sql :: print integer and string in SQL 
Sql :: mysql trim spaces 
Sql :: brew start postgres 
Sql :: version and edition of SQL Server Database Engine 
Sql :: mysql collation for all languages 
Sql :: else if mysql 
Sql :: select distinct after join 
Sql :: mysql execute file 
Sql :: rename column in table sql 
Sql :: mysql delete data in table 
Sql :: data formate in sql 
Sql :: how to find average in sql 
Sql :: create table as select * from table mssql 
Sql :: mysql function 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =