@# 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



Comments:

<0> !m sjrussel insert_id()
<1> sjrussel: Nothing found
<0> !m sjrussel insert
<1> sjrussel: (INSERT Syntax) : http://dev.mysql.com/doc/mysql/en/INSERT.html
<2> !man last insert id
<1> (How to Get the Unique ID for the Last Inserted Row) : http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html
<0> thx
<3> does anyone know how to select * from a table but add a DATE_FORMAT at the same time?
<2> Add a DATE_FORMAT?
<2> !tell us about evil
<1> will asked me to tell you this: Evil is clearly defined at http://www.parseerror.com/sql/select*isevil.html
<4> i've got just a test db setup i'm toying with, i have a primary key that autoincrements, how can i use this to modify that data or do i need to delete that row and insert a new one with the new data?
<4> update, that's what i was looking for.
<5> got a code here http://www.phpriot.com/2607 to insert multiple users and p***words to mysql db. can someone please check it and tell me if it will work Im afraid to mess up my db
<6> when in doubt, create a backup.
<7> Eeekkk, I need some rather urgent help, just lost a drive in a RAID array and I really need to backup all of my MySQL databases and transfer them to another computer. How do I do this? (Linux, latest version of MySQL)



<8> hey - is there any function to do something like concat() multiple rows in a table?
<8> for example...
<8> select concat(job.name, ', ') from employee left join job on employee.id=job.employeeid;
<8> to say, comma separate a chunk of all jobs for a particular employee
<9> !m sol group by functions
<1> sol: (GROUP BY (Aggregate) Functions) : http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html
<9> sol: group_concat
<8> thank you
<8> you'd figure there'd be a link from the concat article :/
<8> this makes things easy :)
<8> i figured id get a "you can't"
<9> yeah it's a nifty function for sure
<9> sol: if you think there should be a link from the concat docs, you should file a docs feature request at bugs.mysql.com... i think it'd be a good idea, too
<10> evening my friends
<8> yea, I'll do that right away then thanks :) -- these links should definitely be there. They're easy to find on google if you know what you're looking for, but these obscure ones are impossible to find sometimes.
<11> hmm after u creat a udf, how do you call it ?
<10> CALL
<10> oh wait
<10> http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html
<10> maybe you should read the whole section.. if you are really sure UDFs are what yo uwant
<10> i'm really drunk. perhaps you can also just ignore me :D
<12> Hey guys. I'm trying to figure out if it is possible to accomplish the following task in one mysql-query: given a table which links a varying number of items n to a specific (where n can be 0), select the last 5 months before a given month m and the 5 after m which contain at least one item n
<13> does anyone know where I can find a list and descriptions of all the possible variables I can put into my.cnf for Mysql 4.1?
<14> I'm setting up a schema for a database that we're goign to be using with odbc. I'm designing the table in mysql, so since I want transaction support, after every table I'm using the Engine=InnoDB. But since it's an odbc app, somebody might want to use it with another rdbms. how can I have it so that the schema text file is mmost portable but ensures that when used with mysql that it uses the correct engine?
<2> mishehu, You can set the default type to InnoDB.
<2> I have no idea how since I've never done it. Might be in the CREATE DATABSE...
<15> what was the question?
<9> set storage_engine='InnoDB'
<9> can do it locally or globally
<16> hi all
<16> how can I give access to database "alo" for IP 127.0.0.5 ?
<15> use grant
<16> exact command of it ? :D I can login mysql as root then ?
<15> mysql.com/grant syntax
<17> im running mysql 4.0 and i have my index auto_increment. i have ids 1 to 10, when i delete say 3 and add another record, it puts record 11 after 2 in the index
<17> whats up with that?
<17> so listing select * from table; it would list the records 1, 2, 14, 4, 5
<13> can someone tell me the appropriate formula for deciding query_cache_size?
<18> hi, is there a way to define in a LIKE where_clause which char might be there or not? like where 'this' like '{here might be a "~"}$ident@%'
<15> big enough that you're not constantly out of free blocks
<19> Punkcut: SET GLOBAL query_cache_size = n * 1024 * 1024
<18> because % catches longer words and _ will still match on more than exactly those that i want
<19> (where n is the number of MB)
<19> Ord0g: you could use RLIKE, but it would be quite slow
<19> you should go with two queries in an UNION instead
<20> scud_ use order by
<19> or simplier: WHERE field LIKE 'foo' OR field LIKE '~foo'
<18> myISAM does not support nested queries afaik
<18> or do you mean something different
<21> Ord0g: Try MySQL 4.1 or better.
<19> UNION is available since... err 4.0 or 4.1
<19> 4.1? wasn't sure about it
<18> MySQL 4.1.11-Debian_4sarge2-log running on localhost
<21> UNION has been available since before 4.1.
<18> its about the nested queries ... i guess im missing something
<21> Ord0g: Nested queries are supported in 4.1 or better.
<18> ok so it doesnt interfere with the db type ?
<21> No
<18> oh
<18> Try to avoid complex SELECT queries on MyISAM tables that are updated frequently, to avoid problems with table locking that occur due to contention between readers and writers.
<18> how much is frequently ...



<2> HubertRoksor`, UNIONs are availabe as of 4.0
<18> For MyISAM tables that change frequently, you should try to avoid all variable-length columns (VARCHAR, BLOB, and TEXT). The table uses dynamic row format if it includes even a single variable-length column
<18> now thats interesting
<18> could somebody explain the disadvantages of dynamic row format ?
<22> It's slow.
<22> If you know this static-length column takes up 32 bytes every time, you can scan to the 33rd byte to skip it.
<22> Otherwise, you need to figure out how long the column is for each row.
<22> Instead of + - * /, you're doing scans all over the place.
<2> Of course, with a smaller row size, you can read more rows at a time.
<18> varchar needs a length param
<2> And?
<18> text doesnt
<2> So?
<18> works for me without declaring it ... dont know if theres a default
<18> i missed
<23> command to create a p***word for mysql?
<24> !m stormchas3r3 grant
<1> stormchas3r3: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html
<24> !m stormchas3r3 set p***word
<1> stormchas3r3: (SET P***WORD Syntax) : http://dev.mysql.com/doc/mysql/en/SET_P***WORD.html
<23> ty
<25> is mysqldump what i want to use if i want to import databases from one server to another?
<26> hello
<26> anybody have set in winxp
<26> two server
<26> one pc for php and one for mysql
<18> alien3d no but i dont think one should have a problem with that
<25> i've managed to save all my databases as sql files, will i need to manually put them on the server and then import? as i have them sitting on one pc now which is not where the server is locate
<25> d
<27> What could be causing mysql to lock up when I issue a TRUNCATE TABLE command?
<2> ChairoNoMe, You
<27> will: if I pay for commercial mysql support, does it come with the snide remarks?
<2> Usually not.
<27> great
<27> It's weird what's happening
<2> I can only imagine.
<27> I issue a TRUNCATE TABLE table and it just sits there
<27> i suppose it has something to do with the size of the table
<27> the table has a million rowsw
<27> rows
<2> Shouldn't be because as far as I know, it will delete the table. Are there any other queries running that is using that table?
<27> it's a live server, so yeah.
<27> it's serving web customers
<27> wait
<2> For how long?
<27> sorry i misheard you
<27> there's nothing else using the table
<27> other people using the database, yes.
<2> Is the server doing anything when you issue the TRUNCATE? Like CPU usage? Disk usage?
<2> What kind of table are you dropping? InnoDB?
<27> myISAM
<2> Are you sure?
<27> alright
<27> i figured out
<27> there was a rogue process using the table
<2> :)
<2> You figured it out????
<27> you know what would be really useful? Something to tell you when you issue the command that that table is in use
<2> *YOU* ???
<2> :)
<2> Request it. Make it.
<2> Usually people check to see if it's use, lock it, etc.
<28> hi
<28> Can you explain me how can i get the values of the last entry in a table? if i use select max(idcolum) from table takes de biggest value not the last entry. Sorry for my english :)
<29> yes
<29> the max command takes highest value
<29> hmm..
<29> do you have id column?
<29> with auto_increment option enabled?
<28> i have id colum but increment......
<28> nop
<2> Define "last entry".
<2> Imagine your table as a gl*** jar. Imagine each row as a marble. When you insert rows into the table, it's like putting marbles into a jar.
<2> In all honesty, MySQL doesn't know what marble was put in last. You have to 'tag' it somehow, like an autoinc or timestamp.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#python
#gentoo
#css
best-prono-movie
jpegimge
site:www.quotesdb.info doctormo
ubuntu 386 686 crusoe
ubuntu chgroup how to
#perl
#perl



Home  |  disclaimer  |  contact  |  submit quotes