#mysql
03 October 2007
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
02:48 <****> and limiting it to 50K entries?
02:48 <****> I know about LIMIT
02:48 <****> so something like...
02:48 <****> select * from users LIMIT 50000
02:48 <****> but how do I specify the row I start at
02:51 <****> What's the easiest way to simply 'duplicate' a row? (but taking into account an autoincrement id)
02:51 <****> oh, I can use offset
02:52 <****> is there any special case syntax or something? or just has to be a manual INSERT INTO blah SELECT field1, field2, field3 FROM blah WHERE id = 4 ?
02:52 <****> EoN, I don't think INSERT ... SELECT works on the same table. But if it did you could just do INSERT INTO blah SELECT * FROM blah WHERE id = 4, you don't need to specify the fields.
02:58 <****> Simetrical: but the auto increment id field will still work?
02:58 <****> EoN, hmm, I guess it won't in that case.
02:58 <****> insert select probably work on the same table, but your id is likely the primary key, and you need to select null for id and list the rest of the columns
02:58 <****> damn.
02:58 <****> ok thanks guys
02:59 <****> action1: you can do limit 10,50
02:59 <****> whats a good way to store time in mysql
02:59 <****> like format
03:01 <****> time or datetime or timestamp datatype, choose whichever suits you
03:02 <****> SELECT * FROM TABLE WHERE date <= '2007-10-2' ; # won't show records after 00:00:00 -- what's a quick fix?
03:04 <****> fg3, WHERE date < '2007-10-03'?
03:05 <****> without changing the date
03:05 <****> Uh, what do you mean, "without changing the date"? You have to change *something* in the query.
03:05 <****> You could also do DATE(date) <= '2007-10-02' if you like. It's all the same.
03:06 <****> I was wondering if I could say '2007-10-02" + a day ;
03:06 <****> that's what I needed
03:06 <****> thx
03:06 <****> Yes, you can also do date <= '2007-10-02' + INTERVAL 1 DAY, or something similar to that.
03:07 <****> that might be better - thx
03:07 <****> using mysql 4.x
03:08 <****> can someone suggest a free tool i can use to create a datamodel and generate sql db creation scripts ?
03:09 <****> nkbreau, your text editor of choice?
03:09 <****> a datamodel?
03:09 <****> like MySQL Workbench ?
03:09 <****> or DBDWorkbench or something of the sort
03:10 <****> where you create tables, keys, foreign links, etc... using a gui tool
03:10 <****> then it generates the sql code to create the database for you
03:10 <****> you would call those ER-Diagrams
03:10 <****> that stands for Entity Relation
03:10 <****> really ? i always used datamodel for some reason...
03:10 <****> ER makes me thinkg of a class diagram or something
03:10 <****> so mysql workbench ?
03:10 <****> is that the best free one ?
03:11 <****> yea, there's another one as well.
03:11 <****> hrmm
03:11 <****> or dbdworkbench ?
03:11 <****> I've used most of them.
03:11 <****> i used to use clay plugin for eclipse
03:11 <****> but it keep giving me a stack trace now :P
03:11 <****> interesting
03:11 <****> used it for years and now on my new laptop it craps out...
03:11 <****> suckie.
03:11 <****> hrmm
03:12 <****> are bool "values" stored as 'true'/'false' or true/false
03:12 <****> ?
03:12 <****> or 0/1?
03:12 <****> nkbreau: here
03:12 <****> http://forums.mysql.com/read.php?113,22993,22993
03:13 <****> Trent: BOOL is a tinyint(1), so they are stored as 0 or 1
03:13 <****> blobaugh, Thanks.
03:13 <****> nkbreau: DBDesigner
03:13 <****> np
03:13 <****> thanks
03:13 <****> what index does mysql start an AUTO_INCREMENT column at?
03:13 <****> i know how to set the auto increment value... but where does it start by default?
03:14 <****> does it start at 0?
03:14 <****> abstrakt: I think so
03:14 <****> i'm looking for something other than "I think so" but thanks
03:14 <****> abstrakt: starts at 1 by default
03:15 <****> yeah, I should have looked that up
03:15 <****> my bad
03:15 <****> abstrakt: shouldn't matter though, it's just a unique number. if you care about what number it is exactly, something in your app or design is wrong
03:15 <****> it can cope with being 0 also. but the default starting point is 1
03:16 <****> It can start at any number you want, in fact.
03:16 <****> exactly.
03:16 <****> but it shouldn't matter.
03:17 <****> like arjenAU said, it shouldn't matter.
03:17 <****> so make sure you don't fail.
03:19 <****> arjenAU: ... uh thanks for your opinion, but my app logic is not flawed, i just had a question and it was answered, thanks for your time.
03:19 <****> just to stress: it really, really shouldn't matter.
03:19 <****> seen todointx
03:20 <****> thoughtful, why so emphatic?
03:20 <****> abstrakt: perhaps your application logic is flawed?
03:20 <****> perhaps i'm leaving to go get real work done, but thanks for your opinions.
03:20 <****> There's nothing wrong with embedding logic into primary keys, obviously.
03:20 <****> lol
03:21 <****> I can't, granted, think of any logical significance you could ascribe to an autoincrement key other than its chronological position in a sequence.
03:21 <****> Any idea how to make a InnoDB table ready for fulltext search?
03:22 <****> Simetrical: well, i could possibly support abstrakt's statement that it's not 'flawed', in that his app possibly / probably works if he knows what number autoincrement starts at, but it's definitely flawed in the sense that any app intentionally or accidentally designed to care (or where it matters, may be a better way of putting it) isn't optimal.
03:22 <****> Salah, InnoDB doesn't support fulltext search.
03:22 <****> Simetrical, or MyISAM?
03:22 <****> Salah, with MyISAM you just add a fulltext index.
03:22 <****> Salah: you will need a magic wand, or a large hammer. I can give you the address to apply it to
03:23 <****> Salah: you may want to look at the Sphinx system also. google for sphinx fulltext mysql
03:23 <****> how do i dump my table spaces and log files with all data that is supposed to be in them?
03:23 <****> Simetrical: was it me or was abstract being rather defensive ;-)
03:23 <****> rawake: mysqldump
03:24 <****> arjenAU, was it me or were you and EoN and thoughtful being rather aggressive?
03:24 <****> Salah: myisam does fulltext. see mysql.com/fulltext
03:24 <****> how can i convert datetime into different formats, so it's sorted as YYYY-MM-DD HH:MM:SS how can i call it to display different pieces of information different ways, like the day could be March 3rd, 2008 or 3/3/2008
03:24 <****> Simetrical: stating important facts can be regarded as agressive, yes. btu that would be a waste of energy, now wouldn't it?
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
