Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql 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 :: replace null in sql 
Sql :: remove unique key from a table 
Sql :: mysql compare datetime to another datetime 
Sql :: mysql between 
Sql :: zsh-syntax-highlighting zsh-autosuggestions 
Sql :: windows services sql 
Sql :: mysql list tables by size 
Sql :: mariadb mysql root access denied 
Sql :: Msg 241, Level 16, State 1, Line 12 Conversion failed when converting date and/or time from character string. 
Sql :: oracle running queries sql 
Sql :: sql change a colum to unique 
Sql :: alter table name sql 
Sql :: how to insert json value in mysql 
Sql :: if null mysql 
Sql :: linq join 
Sql :: sqlite save db 
Sql :: how to connect postgresql database with java 
Sql :: How to pass password to mysql command line 
Sql :: SQL Server Configuration Manager location 
Sql :: sql escape quote 
Sql :: sqlite create tables 
Sql :: failed to connect to mysql at localhost:3306 with user root 
Sql :: sql function to add all values round of 2 decimal places 
Sql :: How to drop procedures in mysql ? 
Sql :: sql cast 
Sql :: mysql select distinct date from timestamp 
Sql :: sql insert column 
Sql :: mysql vs postgresql 
Sql :: how to delete a table in mysql 
Sql :: recursion in sql 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =