@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Comments:

<0> ~/ == default directory of current user
<1> patrick: alter table is probably important to customers. Do your customers require stored procedures?
<0> no idea. This is all new to me.
<2> !m godzirra date time functions
<3> godzirra: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
<0> Don't have any yet, either :)
<1> patrick: They don't until one requests it, then :)
<1> What are you hosting? Websites for random people?
<1> Big enterprise apps?
<4> ALTER TABLE clientes SET Uid AUTO_INCREMENT =600;
<4> #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET Uid AUTO_INCREMENT = 600' at line 1
<5> thanks archivist
<0> mendel: Websites for random people. This is mostly a learning experience (never setup a server before), but I hope to make a bit of cash on the side, too
<6> where did you find that syntax, malmen?
<1> malmen: You've added some words there.
<1> malmen: It's a table-wide property. Do just like I pasted



<1> patrick: Eh, they don't need stored procedures then. :)
<0> mendel: Thanks
<0> What _are_ stored procedures? Do they basically create their own functions to execute, like maybe PI()?
<0> Which would print the value of PI, of course...
<1> patrick: Code that runs on the database end. Might be math, might actually affect a table,
<1> http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html
<7> I have a table called "regions" which has co_id, id, desc. It holds geographic regions in the USA that our customers use when they enter their orders. Most people use the "defaults" which are the states. However, for people that work only in California(for example) they can use "custom" regions instead (SD, LA, Sac, SF, etc). What mihgt be the best way to NOT repeat the "defaults" over and over? Just use co_id 0 for them?
<7> Or is there a better way?
<8> mendel: thanks for thinking that through with me BTW
<2> webben ant then there are ***emblies and definable ***emblies
<1> webben: np. I guess it comes down to "Don't try to cram one-to-many relationships into one table" :)
<9> must be nice when jerks not only run things when you need help, but also run everyone else around you
<10> but the server cant be down cause i can connect to it via phpMyAdmin. i dont understand it:(
<8> archivist: sorry?
<8> archivist: if that's technical jargon it went whoosh over this newbie's head
<10> can it?
<2> eg "standard" items that actually get built to order
<8> well there will be "customised ***emblies" like that actually
<8> but i was planning on just treating those like ordinary products
<2> eg hydraulic pipes get cut to length and ***empled to order
<8> yes the lengths stuff is slightly worrying - but the vague hope is that for stuff that needs that much attention to detail the customer can phone up
<11> I want to select records from the last day and month and add them...can I do that with a single sql?
<2> yes but you may need to drive the order operative
<8> for the ordinary items - baths, loos, taps, showers - it ought to be alright - i _think_
<8> archivist: drive?
<2> control
<2> guide
<8> i've lost you - who or what is the order operative?
<2> the telephone operater taking the order over the phone
<8> archivist: ah - i see what you mean
<8> archivist: i need to know a bit more about the domain before i can say this with confidence - by i think the really custom stuff will be furniture that's made out of little components & cut to size
<12> how do I subtract one datetime from another
<8> so it really needs human-human interaction anyway
<13> !m lzhang date time functions
<3> lzhang: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
<8> s/by i think/but i think/
<0> The ALTER privilege is pretty much a must, correct?
<12> lsmith: I'm looking at that doc page
<0> though it says in the manual that it could be used to subvert the privilege system. Though I don't think it would with me, because all privileges would go to dbname.*
<12> lsmith: but I can't identify which one I should be using
<12> lsmith: INTERVAL?
<13> what do you want returned?
<13> DATEDIFF(expr,expr2) .. "DATEDIFF() returns the number of days between the start date expr and the end date expr2."
<12> lsmith: I have a datetime for when something started, and I want to find how long ago that was, so essentially a NOW() - datetime
<12> lsmith: so that works for time too?
<12> lsmith: from the doc... 'Only the date parts of the values are used in the calculation.'
<13> three is also TIMEDIFF()
<13> etc
<13> just search the page for DIFF(
<12> lsmith: I see so I use both... thanks!
<12> that's what was confusing me
<13> TIMESTAMPDIFF()
<13> is what you want then
<0> How can I use the P***WORD() function when GRANTing privileges, like "GRANT ... ON ... TO ... IDENTIFIED BY P***WORD = P***WORD('p***word');
<13> time for lalaland
<14> patrick_, Why would you want to do that?
<14> IDENTIFIED BY 'p***word'
<15> how might I load a 5.0 table into a 4.0 database?
<8> hmm ... i've revised my scheme according to mendel's suggestions as i understood them, but now he's gone: http://hashmysql.org/paste/viewentry.php?id=1827 If anyone else could possibly look at this and tell me if it looks workable I'd be very grateful.
<14> jtaylor, mysqldump --help. Look for "compatible"



<8> bearing in mind these tables have got to be pulled up into Hibernate objects
<2> dont see why nulls in variant is a problem (no variant no entry)
<14> NUKKA NUKKA NULL NULL
<8> archivist: sorry - i meant to delete that bit (was concern with previous scheme)
<8> have repasted to http://hashmysql.org/paste/viewentry.php?id=1828 to make that clearer
<2> shows I read it !
<8> :)
<8> NUKKA NUKKA??
<8> does the scheme look better now?
<8> better here basically meaning faster
<8> especially for SELECTs
<16> hello
<2> category description(types as well as brands) maybe, short term dated pricing for promos
<16> i have boolean filed of type tinyint(1). is there a way to let it return Y/N on a query?
<16> filed=field
<8> archivist: hmm... hopefully category names will be self-explanatory. Modelling promotions in all their complex forms is an up-and-coming nightmare. I figured that ought not to be in any of the products tables themselves though, especially as promotions could for example link two products or involve complex logic (e.g. buy 3 get one free!)
<2> pricing is luvly not!
<8> i know
<8> pain in the neck
<8> no wait - attitude correction - exciting challenge to which i am looking forward ;)
<2> units are fun to and from stock
<8> archivist: sorry?
<2> by case sell units and or smaller pk qty
<2> by=buy
<8> hmm
<2> buy reel 100 mtrs sell yards
<8> i'd say a box of x is a different product to x
<8> oh i see
<8> you mean display of units?
<8> yeah - i'll probably have some sort of widgets to convert metric to imperial
<8> in the catalog display
<17> is it possible to use variables in a column='query' statement? i know part of the "query" but not all of it. if someone would be able to even just point me in the right direction I'd be grateful
<8> but in the db i want to keep it clean and store everything in one or the other
<2> no as I am thinking stock in comes as case/pallet of 1000 , stock in unit qty, sell in units as supplied say box of 10
<8> ah - you mean the wholesale units may be different than retail
<2> yes
<8> hadn't thought of that
<8> darn
<8> thanks for pointing that out
<2> as well as pack break down for retail
<2> not many systems have good unit/qty handling
<2> if its a big system then warehouse/s stock locations and qty's
<8> fortunately - should only be one warehouse
<8> so one stock value
<8> but good point
<18> archivist: yeah at one of my jobs the system had a real issue with tearing open a box of 1000 screws to sell them individually.
<8> is it best to have separate tables and objects for managing supplies?
<2> we had un***embly to kit the ***emble those to another
<2> the=then
<8> and map those to to the products part of the system somehow?
<19> once i had a job where they made me count a 5gal bucket of BNC t connectors... one at a time.. not by weight... i didnt show up the next day
<2> depends if packed
<18> Need a shaker to get more in the bucket.
<18> Those old t connectors would probably pack well with a little vibration.
<2> did you need to count the 50ohm separately from the 75 ohm bnc's
<18> Oh you are mean.
<19> it was aweful
<20> What do you do if you accidently drop all the tables with your mysql database?
<20> s/with/within
<21> reach for the backup
<2> or cry
<21> then cry
<20> luckilly its on my test server
<20> I guess i can just export the mysql database from my production server and import it that way eh?
<22> hm.. if i have a column with space seperated words, is there possible to have a query checking which words are the most common?
<23> Hi there
<0> how might I create a script, which would semi-replace "CREATE", which first checks how many databases the user owns (they start with "user_"), and if they are at a certain limit, won't create the database, but if under that limit, it would create the database name, with a prepending "username_"?
<24> unf.
<2> Homersim, I count words with a script (during a search engine index build)
<22> so it isnt any way of doing it with sql?
<23> patrick_> Is there a reason why you want to have mysql make that decision?
<20> whew that worked out pretty well


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

#javascript
#css
#web
#suse
sed delete words line
646456887
+www.bluebit.gr/matrix-calculator
mdf+k3b dapper
DecodeACRunLevel
egroupware reconfigure debian



Home  |  disclaimer  |  contact  |  submit quotes