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

<sjrussel> !m sjrussel insert_id()
<SQL> sjrussel: Nothing found
<sjrussel> !m sjrussel insert
<SQL> sjrussel: (INSERT Syntax) : http://dev.mysql.com/doc/mysql/en/INSERT.html
<will> !man last insert id
<SQL> (How to Get the Unique ID for the Last Inserted Row) : http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html
<sjrussel> thx
<_chris> does anyone know how to select * from a table but add a DATE_FORMAT at the same time?
<will> Add a DATE_FORMAT?
<will> !tell us about evil
<SQL> will asked me to tell you this: Evil is clearly defined at http://www.parseerror.com/sql/select*isevil.html
<jp-> 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?
<jp-> update, that's what i was looking for.
<dalvenjia> 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
<Supaplex> when in doubt, create a backup.
<Cyde> 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)
<sol> hey - is there any function to do something like concat() multiple rows in a table?
<sol> for example...
<sol> select concat(job.name, ', ') from employee left join job on employee.id=job.employeeid;
<sol> to say, comma separate a chunk of all jobs for a particular employee
<litheum> !m sol group by functions
<SQL> sol: (GROUP BY (Aggregate) Functions) : http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html
<litheum> sol: group_concat
<sol> thank you
<sol> you'd figure there'd be a link from the concat article :/
<sol> this makes things easy :)
<sol> i figured id get a "you can't"
<litheum> yeah it's a nifty function for sure
<litheum> 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
<Jax> evening my friends
<sol> 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.
<cold_> hmm after u creat a udf, how do you call it ?
<Jax> CALL
<Jax> oh wait
<Jax> http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html
<Jax> maybe you should read the whole section.. if you are really sure UDFs are what yo uwant
<Jax> i'm really drunk. perhaps you can also just ignore me :D
<dPL> 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
<Punkcut> 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?
<mishehu> 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?
<will> mishehu, You can set the default type to InnoDB.
<will> I have no idea how since I've never done it. Might be in the CREATE DATABSE...
<firewire> what was the question?
<litheum> set storage_engine='InnoDB'
<litheum> can do it locally or globally
<teddyns> hi all
<teddyns> how can I give access to database "alo" for IP 127.0.0.5 ?
<firewire> use grant
<teddyns> exact command of it ? :D I can login mysql as root then ?
<firewire> mysql.com/grant syntax
<scud_> 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
<scud_> whats up with that?
<scud_> so listing select * from table; it would list the records 1, 2, 14, 4, 5
<Punkcut> can someone tell me the appropriate formula for deciding query_cache_size?
<Ord0g> 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@%'
<firewire> big enough that you're not constantly out of free blocks
<HubertRoksor`> Punkcut: SET GLOBAL query_cache_size = n * 1024 * 1024
<Ord0g> because % catches longer words and _ will still match on more than exactly those that i want
<HubertRoksor`> (where n is the number of MB)
<HubertRoksor`> Ord0g: you could use RLIKE, but it would be quite slow
<HubertRoksor`> you should go with two queries in an UNION instead
<archivist> scud_ use order by
<HubertRoksor`> or simplier: WHERE field LIKE 'foo' OR field LIKE '~foo'
<Ord0g> myISAM does not support nested queries afaik
<Ord0g> or do you mean something different
<Xgc> Ord0g: Try MySQL 4.1 or better.
<HubertRoksor`> UNION is available since... err 4.0 or 4.1
<HubertRoksor`> 4.1? wasn't sure about it
<Ord0g> MySQL 4.1.11-Debian_4sarge2-log running on localhost
<Xgc> UNION has been available since before 4.1.
<Ord0g> its about the nested queries ... i guess im missing something
<Xgc> Ord0g: Nested queries are supported in 4.1 or better.
<Ord0g> ok so it doesnt interfere with the db type ?
<Xgc> No
<Ord0g> oh
<Ord0g> 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.
<Ord0g> how much is frequently ...
<will> HubertRoksor`, UNIONs are availabe as of 4.0
<Ord0g> 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
<Ord0g> now thats interesting
<Ord0g> could somebody explain the disadvantages of dynamic row format ?
<Julian|Work> It's slow.
<Julian|Work> If you know this static-length column takes up 32 bytes every time, you can scan to the 33rd byte to skip it.
<Julian|Work> Otherwise, you need to figure out how long the column is for each row.
<Julian|Work> Instead of + - * /, you're doing scans all over the place.
<will> Of course, with a smaller row size, you can read more rows at a time.
<Ord0g> varchar needs a length param
<will> And?
<Ord0g> text doesnt
<will> So?
<Ord0g> works for me without declaring it ... dont know if theres a default
<Ord0g> i missed
<stormchas3r3> command to create a p***word for mysql?
<CPUnerdX> !m stormchas3r3 grant
<SQL> stormchas3r3: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html
<CPUnerdX> !m stormchas3r3 set p***word
<SQL> stormchas3r3: (SET P***WORD Syntax) : http://dev.mysql.com/doc/mysql/en/SET_P***WORD.html
<stormchas3r3> ty
<Ainslee> is mysqldump what i want to use if i want to import databases from one server to another?
<alien3d> hello
<alien3d> anybody have set in winxp
<alien3d> two server
<alien3d> one pc for php and one for mysql
<Ord0g> alien3d no but i dont think one should have a problem with that
<Ainslee> 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
<Ainslee> d
<ChairoNoMe> What could be causing mysql to lock up when I issue a TRUNCATE TABLE command?
<will> ChairoNoMe, You
<ChairoNoMe> will: if I pay for commercial mysql support, does it come with the snide remarks?
<will> Usually not.
<ChairoNoMe> great
<ChairoNoMe> It's weird what's happening
<will> I can only imagine.
<ChairoNoMe> I issue a TRUNCATE TABLE table and it just sits there
<ChairoNoMe> i suppose it has something to do with the size of the table
<ChairoNoMe> the table has a million rowsw
<ChairoNoMe> rows
<will> 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?
<ChairoNoMe> it's a live server, so yeah.
<ChairoNoMe> it's serving web customers
<ChairoNoMe> wait
<will> For how long?
<ChairoNoMe> sorry i misheard you
<ChairoNoMe> there's nothing else using the table
<ChairoNoMe> other people using the database, yes.
<will> Is the server doing anything when you issue the TRUNCATE? Like CPU usage? Disk usage?
<will> What kind of table are you dropping? InnoDB?
<ChairoNoMe> myISAM
<will> Are you sure?
<ChairoNoMe> alright
<ChairoNoMe> i figured out
<ChairoNoMe> there was a rogue process using the table
<will> :)
<will> You figured it out????
<ChairoNoMe> you know what would be really useful? Something to tell you when you issue the command that that table is in use
<will> *YOU* ???
<will> :)
<will> Request it. Make it.
<will> Usually people check to see if it's use, lock it, etc.
<arrase> hi
<arrase> 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 :)
<murdoc> yes
<murdoc> the max command takes highest value
<murdoc> hmm..
<murdoc> do you have id column?
<murdoc> with auto_increment option enabled?
<arrase> i have id colum but increment......
<arrase> nop
<will> Define "last entry".
<will> 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.
<will> 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