#mysql - Tue 15 May 2007 between 02:03 and 02:12



ollieluke-jr do you use longip()?
luke-jrno, wtf is longip()?
actionchadmaynard recommends INET_NTOA() and INET_ATON() for IP's in mysql
chadmaynardrecommends INET_NTOA() and INET_ATON() for IP's in mysql
ollieit turns an ip into a number like -1062731506
that is 192.168.1.14
luke-jrmy problem is that varchar(15) is too small for IPs
varchar(40) is needed
ollieusing my method I can use int(10)
chadmaynardvarchar is bogus
ollieI think it is a good way to do it, someone recommended it in a chat room. what do you think?
luke-jrOllie: int(10) would be too small for an IP too -.-
chadmaynardOllie: INET_NTOA,ATON are the MySQL functions for converting IPs to/from LONG
ollieluke-jr not when it is converted using the longip() php function
MysticOneso any other ideas on why mysql won't let me login?
luke-jrOllie: there are more IP addresses than LONG values
TheMafiais there a way I can use sum in the where part of of a query, ie select item_name, sum(quantity),reorder_level from items where in_use = 0 and category_id='wireless' and reorder_level < sum(quantity) group by item_name;
chadmaynardlike-jr: ehh? unsigned
luke-jryeah, unsigned
128 bits in an IP
longs are only 64-bit at most
olliesorry its called ip2long()
http://uk3.php.net/manual/en/function.ip2long.php
ip2long Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address
chadmaynardluke-jr: ips are 32 bit
luke-jrchadmaynard: no
2002:1891:f663:0:2b0:d0ff:fe49:6b31
please explain how that is 32 bit
MysticOneanyone? *hopeful look*
chadmaynardnot ipv6
ollieyeah you can fit ipv4 into a long
luke-jrv6 is the most recent IP ver
ollie:)
chadmaynardluke: and barely used.... mysql 6 is out but we dont assume you are on it
luke-jrchadmaynard: never had problems with MySQL 4/5...
ollieAs of December 2005, IPv6 accounts for a tiny percentage of the live addresses in the publicly-accessible Internet, which is still dominated by IPv4. The adoption of IPv6 has been slowed by the introduction of classless inter-domain routing (CIDR) and network address translation (NAT), each of which has partially alleviated the impact of address space exhaustion.
from wikipedia :)
luke-jrthat statement includes Windoze lusers
I think you'd find *nix users are a bit more likely to be v6 capable
IoC_hi.. im getting the "com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column " error.. i googled and saw the fix was "jdbcCompliantTruncation=false" which don't think is nice.. is there a way to set the max size of a blob? like 10 Megabytes?
it worked for smaller files like 10-30KB files though...

Page: 5 12 19 26 33 40 47 54 61 68 

IrcArchive