Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 381 Pomógł: 12 Dołączył: 9.07.2007 Ostrzeżenie: (0%)
|
Witam, mam taki problem, postawiłem sobie LMS, i wszystko dobrze działa (IMG:http://forum.php.pl/style_emoticons/default/haha.gif) Ale w bazie zamiast IP, które dodaje czyli 192.168.0.1 jest coś takiego 3232237834 i chciałem sie zapytać jak to działa (IMG:http://forum.php.pl/style_emoticons/default/haha.gif) Jak to sie potem zamienia spowrotem w normalne IP (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Tak wygląda struktura tabeli: Kod CREATE TABLE `nodes` ( `id` int(11) NOT NULL auto_increment, `name` varchar(16) NOT NULL default '', `mac` varchar(20) NOT NULL default '', `ipaddr` int(16) unsigned NOT NULL default '0', `ipaddr_pub` int(16) unsigned NOT NULL default '0', `passwd` varchar(32) NOT NULL default '', `ownerid` int(11) NOT NULL default '0', `creationdate` int(11) NOT NULL default '0', `moddate` int(11) NOT NULL default '0', `creatorid` int(11) NOT NULL default '0', `modid` int(11) NOT NULL default '0', `netdev` int(11) NOT NULL default '0', `linktype` tinyint(1) NOT NULL default '0', `access` tinyint(1) NOT NULL default '1', `warning` tinyint(1) NOT NULL default '0', `lastonline` int(11) NOT NULL default '0', `info` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), UNIQUE KEY `ipaddr` (`ipaddr`), KEY `netdev` (`netdev`) ) TYPE=MyISAM AUTO_INCREMENT=1855; A tak kawałek zrzutu: Kod INSERT INTO `nodes` (`id`, `name`, `mac`, `ipaddr`, `ipaddr_pub`, `passwd`, `ownerid`, `creationdate`, `moddate`, `creatorid`, `modid`, `netdev`, `linktype`, `access`, `warning`, `lastonline`, `info`) VALUES
(3, 'Test', '00:09:92:01:85:B2', 3232237834, 0, '', 0, 1161669555, 1161669577, 3, 3, 1, 0, 1, 0, 0, ''), Ten post edytował Elber 1.02.2008, 09:45:21 |
|
|
|
Elber jak to przerobić na normalny IP - `ipaddr` int(16) 1.02.2008, 09:44:33
heaven Możesz pobrać juz z bazy Twoja oczekiwana wartosc ... 1.02.2008, 10:00:56
dr_bonzo http://dev.mysql.com/doc/refman/5.0/en/mis...-func... 1.02.2008, 10:35:10
Elber Jak by wyglądał skrypt php, który zamienił by wszy... 1.02.2008, 11:34:51
SirZooro Oj przecież poprzednicy wszystko napisali co trzeb... 1.02.2008, 17:00:34
grzywka18 A ja zapytam tylko ze o zamiane wartosci z tabeli ... 5.08.2008, 22:25:54 ![]() ![]() |
|
Aktualny czas: 23.12.2025 - 18:04 |