#mysql
02 November 2007
Total 16 pages. You are browsing page 5/16.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
10:24 <****> so...
10:24 <****> check it ;)
10:24 <****> It's 128M
10:25 <****> on all systems?
10:25 <****> Yeah
10:25 <****> Hm.. 1635280189 is like 1.5G isn't it ?
10:25 <****> yeah
10:25 <****> wtf..
10:25 <****> you shouldn't store movies in a database
10:26 <****> hehe
10:26 <****> What the heck has happened here..
10:29 <****> Actually, I lied.. on the slave that's still running it's 8M
10:30 <****> strange
10:30 <****> you might resync
10:30 <****> you might want to resync
10:30 <****> I tried to resync using that slave, but it just happened again
10:35 <****> I can fully understand why it's broken, just not why one slave's still running
10:46 <****> how can I weed out duplicates from a table?
10:48 <****> Kartagis: distinct
10:51 <****> dupes
10:52 <****> luckily, the bot's still not back
10:57 <****> 1 group by name;
10:57 <****> roffe: delete them from the table
10:59 <****> I have a table named kk_users.. should the fields be callied user_id user_name etc, or.. kk_user_id kk_user_name ??
10:59 <****> hi all, somebody get mysql workbench to ubuntu 7.10 ?
11:01 <****> Shai-Tan: user_id is sufficient.
11:01 <****> thankyou kind sir
11:01 <****> Shai-Tan: you can call them a,b,c :-)
11:02 <****> roffe: currently I have them named after pokemon
11:02 <****> lol
11:08 <****> :-)
11:44 <****> Why are my tables break and needs repaired?
11:44 <****> How for prevent? :(
11:44 <****> thousands of users smashing my stuff!
11:49 <****> SuperJack: innodb?
12:02 <****> there he goes
12:03 <****> We fxed
12:04 <****> very nice!
12:11 <****> nils_: how can I sort a field like 1,2,3,4,5,....,10,11 and so on instead of 1,10,11,12,13,14,....,2,21,22 and so on?
12:11 <****> Kartagis: cast it to integer
12:11 <****> !man cast
12:11 <****> SQL: come on!
12:12 <****> (CAST()) : http://dev.mysql.com/doc/mysql/en/charset-cast.html
12:12 <****> http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html
12:12 <****> that's the page you want
12:12 <****> http://dev.mysql.com/doc/refman/5.1/en/cast-functions.html
12:13 <****> we got the same thing
12:13 <****> indeed
12:13 <****> it's best to store numeric values in one of the various numeric field types
12:15 <****> hrm
12:16 <****> nils_: does this also work for IP addresses?
12:16 <****> you know, it has a numerical and alphanumerical value?
12:16 <****> Kartagis: that's complicated. You can of course express an IP Adress as Integer...
12:16 <****> INET_ATON/INET_NTOA functions
12:17 <****> ip address is integer too?
12:17 <****> of course
12:18 <****> select cast(ip) from tbl_name?
12:18 <****> INET_ATON/INET_NTOA functions
12:19 <****> select inet_aton(ip) from tbl_name?
12:22 <****> yeah maybe it's ntoa I always confuse them
12:23 <****> select inet_ntoa(inet_aton(ip)) from computer; worked
12:23 <****> wee :)
12:23 <****> hehe
12:25 <****> Can anybody suggest a good tutorial for a beginner? I have 2 different tables that I need/want to link together (it looks good on a spreadsheet) but my brain melts a little when I try to design the DB. OR do I let the web-design link it together? It's a very small project, 2 tables with about 4 fields in one and 2 in the other.
12:26 <****> damn!
12:26 <****> it works on cli, ip address fields are blank on web :(
12:26 <****> nils_: help me out here?
12:27 <****> don't know
12:28 <****> nils_: the query is like $query=mysql_query("select uid,mac,inet_ntoa(inet_aton(ip)),dp from computer where uid like concat('$_GET[uid]','%')") or die(mysql_error());
12:29 <****> inet_ntoa(inet_aton(ip))
12:29 <****> this makes no sense
12:29 <****> and you forgot to give it an alias
12:29 <****> so it might be difficult to access it in your app
12:29 <****> but it worked on cli
12:29 <****> yeah
12:29 <****> check the column headings
12:29 <****> the data is there ;)
12:30 <****> like concat sounds strange too
12:31 <****> yay! it works
12:31 <****> $query=mysql_query("select uid,mac,inet_ntoa(inet_aton(ip)) as ip,dp from computer where uid like concat('$_GET[uid]','%')") or die(mysql_error());
12:33 <****> nice
12:33 <****> still
12:33 <****> inet_ntoa(inet_aton(ip)) makes no sense at all
12:33 <****> hello
12:34 <****> do I need to perform another kind of SELECT when doing WHERE key = 'sql' if my datatype is a TEXT?
12:34 <****> It is throwing a illegal error code, 1065 errnumber
12:34 <****> 1064+
12:35 <****> you can also retreive a meaningful error message
12:35 <****> nils_: inet_aton(ip) gives numerical value, inet_ntoa(ip) returns the values as 0.0.0.10, so I thought I might combine them
12:35 <****> Kartagis: one converts to int, the other converts to string.
12:35 <****> !perror 1064
12:35 <****> !perror 2
12:35 <****> ;)
12:35 <****> System error: 2 = No such file or directory
12:36 <****> Kartagis: so what you are doing is int_to_str(str_to_int(ip)).
12:36 <****> nils_: what can I use instead of that?
12:36 <****> Kartagis: perror is for storage engine error codes, not mysql error codes (that's because mysql supplies a meaningful error message with it's own error codes)
12:36 <****> what do you want to achieve in the first place?
12:38 <****> nils_: sort IP addresses like 10.60.1.1,10.60.1.2,.....10.60.1.10 and so on insstead of 10.60.1.1,10.60.1.10,10.60.1.11,..........,10.60.1.20 and so on
12:38 <****> perror 1064 1064
Total 16 pages. You are browsing page 5/16.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
