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



Comments:

<0> kibab: np
<1> http://hashmysql.org/paste/viewentry.php?id=1420
<0> sjrussell: about the php echo being fast, yes it is, but I think Daniel meant he doesn't do echo "$var" when echo $var is a little bit faster, same as you don't need to use . to concatenate with echo, as.. you don't really concatenate with echo in the first place
<1> alphablue: Yup, exactly. :)
<1> Now, would there be anyway to optimize that query that I'm doing?
<2> In terms of deadlock risks, is it safer to use 3 smaller transactions for 3 seperate actions that are performed at the time time, or 1 larger one? (By 'action' I mean many updates - not just a single query - before anyone screams at me ;-) )
<0> daniel: yes .. where it says unique row not found.. try to address that
<3> hey ppl when acessing to a index.php it give this error --> http://rafb.net/paste/results/67AnMv60.html
<0> detonator: depends on what you wanna do, and how you're doing it
<1> alphablue: When it says that, why is that bad?
<2> I figured it'd be something like that alphablue :-)
<1> Because sometimes that user will not have a weapon or amorr equipped
<0> daniel: i think it has to scan more rows
<1> armor*
<0> i don't think mysql cares what your user has or doesn't have :)
<4> Extremina have you run the install script



<0> extremina: it's a php question right ?
<1> alphablue: So what would you suggest for maximum optimized results?
<3> i think is a myql quesyion
<1> I was taught that less queries, less loading so yer =/
<3> becouse whn i run the install script it dont add the inputs to the tables
<3> off the mysql
<0> extremina: all i see are PHP notices ..
<4> Extremina for php variables
<3> humm wait a sec. becouse the mysql dont want to start
<3> i have restart de desktop
<1> Hey Xgc :)
<5> hi
<5> i'm wanting to have mysql generate unique id's for each item added from a php form can someone help m ?
<5> *me
<6> Evening daniel`js.
<7> stored proceedure help please.... i want to p*** a comma separated list of id's to select from a table into a stored proceedure .. can i do this, if so how?
<6> lwizardl: Use an auto_increment column.
<5> Xgc: how do i dothat ?
<5> *do that
<6> lwizardl: You may have to create a table or alter an existing table. Don't you have a primary key for the applicable table?
<3> humm mysql dont want to start
<3> !error 2003
<5> Xgc: i hav a database table setup for the info to be stored into its called "anime"
<6> lwizardl: Does it have a primary key?
<5> Xgc: most likely not, what is that?//
<6> lwizardl: You may need to visit an SQL tutorial or the MySQL documentation.
<5> xgc: i've tryied the php.net/mysql page but thats like reading stereo instructions. i've bought 4 books on php & mysql
<8> hey guys (and girls, if any), is there any advanced command line client for mysql? by "advanced" i mean things like a per-query command history (not per-line), syntax highlighting and so on...
<6> lwizardl: The concept of [primary key] is fundamental to relational theory.
<6> lwizardl: http://cs.anu.edu.au/people/Carol.Edmondson/theory/PrimaryKeys.shtml
<3> its giving to me this eeror --> ERROR 2003 (HY000): Cant connect to MySQL server on "localhost" (10061)
<3> yestarday was working the mysql
<7> anyone here a stored procedure guru?
<6> snipe714: It's called MySQL Query Browser
<8> k, will look it up on google, thx :)
<6> sketch|work: Best to just ask your question. Post any extended information to the pastebin.
<8> litheum: why?
<9> well, give it a try, maybe it'll work for you
<7> Xgc: did above, no answers ... i am trying to make a stored procedure to (amongst other things) call a query along the lines of "SELECT * FROM table WHERE id IN (_comma separated list_)" ... where i can p*** in the comma separated list as an arguement to the stored procedure
<6> snipe714: It's not exactly a command line client.
<6> snipe714: But what you asked suggests more than a command line client.
<9> vim with an appropriate make command could be an exciting alternative
<6> sketch|work: How are you constructing this list? Where does the data come from exactly?
<8> no, what I meant was that the history should remember the whole query that spans a couple of lines
<7> Xgc: the list is constructed in PHP, and can either be p***ed in as '1','2','3'.... or 1,2,3, or i guess however i want to p*** it in
<8> litheum: can vim do that? they say it's the devil's tool :>
<9> who says that?
<9> vim is great
<9> you could do it with emacs too probably, if that's your cup of tea
<8> people who don't know how to use it... like me :)
<8> no, not really
<9> if you use some other highlighting text editor, you can probably make it do what you want
<8> actually, it crossed my mind that it can do syntax highlgt. on the fly..
<5> ok Xgc that page all i could understand was seems that to have unique ids you need to specify the begging id
<6> sketch|work: Well, you certainly can p*** in the data via string and dynamically generate the query. You might also consider using a VIEW. SELECT ... FROM someView WHERE id IN (your list goes here)
<8> maybe there exists some mysql client hack for doing that... hm
<6> lwizardl: That URL is just a single entry point into a single page that is part of a larger document. Check the rest of the document.
<7> Xgc: all the data will come from 1 table, however, the id's from that table may be derived from other (non related) tables ... thus i firstly build a list of ID's that i want to select ... then i am going to p*** that list into the stored proceedure, along with the order and any limit info that i want/need
<9> snipe714: doubtful.. i think people generally use another tool if they want those things
<7> so, dynamically generating the query (using prepare or similar) is the way to do it?



<8> litheum: ok, thanks :)
<6> sketch|work: You would be better off constructing a query that dynamically determines the list and JOINs that with the target table.
<6> sketch|work: All in one step.
<7> Xgc: the other steps are kind of .. depending on the search, a bit more complex
<6> sketch|work: A view sounds more applicable than a stored procedure.
<6> sketch|work: But if this is really dynamic, just construct the query within your stored procedure.
<6> sketch|work: I sense a bit of a design problem here.
<7> Xgc: can i privmsg you?
<6> sketch|work: Feel free to post information to a pastebin. I don't have time to entertain private conversations at the moment.
<7> Xgc: i'll just keep plodding down my current path .. i guess if worst comes to worst i can just rewrite it
<6> sketch|work: You seem to be heading down the road to dynamically generating the query within a stored procedure. That's probably fine, given your current structure.
<7> i have just done my dynamic query building from the php level, not the mysql level - it selects a series of potential ID's based on different searches on different tables, and then takes the interstections of the arrays to build the "search for" array, which then selects from the primary table (in the SP), orders, and limits
<10> is there agood windows based .sql file viewwer
<10> non-web based
<6> kaber2: gvim?
<6> kaber2: It's just a test file.
<10> gvim just dumps the text in the file. i mean graphically
<10> hmm. maybe this mysql query brwoser let's you view it
<7> Xgc: next question - can you have an optional parameter (or a default value for a parameter) on a stored proc?
<1> Hey Xgc, what do you think of this query? http://hashmysql.org/paste/viewentry.php?id=1420
<6> sketch|work: I'm not sure if MySQL supports default arguments. It probably does not support optional arguments.
<7> Xgc: okay, guess i will be defaulting the parameters at PHP level
<6> daniel`js: Seems fine.
<1> Xgc: Alright, there's no other way to make that query faster? Or perhaps do it different to get the same results even faster?
<1> Xgc: I ask because earlier we were discussing that using many left joins is 'bad' for optimizing..well in some cases.
<7> is there a function that will get the number of rows that would have been selected if a statement was not limited?
<7> ahh, never mind - SQL_CALC_FOUND_ROWS
<1> Is there anyway to get the slow query log enabled without recofiguring mysql?
<7> Xgc: can you cache an entire result set, then do some other selects, then return the cached result set?
<7> i want to run a select, get the total number of results, select the number of results, then select the result set
<11> is there a way to evaluate data from mysql as part of the query?
<9> memeyou: ?
<11> like, use a string of text as part of the query
<9> subquery perhaps?
<9> without an example, your question is pretty hopeless
<7> gah, i need 2 things ... the total number of rows that would have been found (without the limit), and the total number of rows that were found (with the limit) ... =\
<12> is there a way i can do this? " select * from foo where bar = ""; "
<12> the equal to blank doesn't seem to work
<13> Yeah. And that's the way.
<13> Or =null if you want unset values.
<13> By default, it's null, not empty.
<12> FreeOne3000: Thanks!
<1> I don't think = NULL works for me..
<1> If it doesnt work for you.. try IS NULL rather than = NULL
<14> hi! What query can I use to create a .sql with a dump of the data in form of insert commands? I can't use mysqldump or select into outfile
<15> will, you happen to be around?
<9> scorphus: why can't you use mysqldump? that's your only option
<9> or phpmyadmin or something along those lines
<14> litheum: I removed the database, but still have a connection with the server
<9> scorphus: that doesn't really have any effect on using mysqldump
<14> litheum: mysqldump tells me incorrect p***
<9> what database did you drop?
<14> litheum: because the database was deleted
<14> a database named tterra
<14> litheum: I deleted the database after connecting to it
<14> and, still connected I can select * from any table
<14> but it does not accept new connections
<14> hmm, it seems I'll have to regexp the output from console. any thoughts?
<16> xiuan, Why me?
<16> Go find Therion.
<15> will, lol
<15> will, hes not around
<15> will, think you could give me a quick hand?
<17> when replicating do most people use read-only on the slave?
<16> It's a good idea to.
<17> will: thanks
<18> oremj: just beware that root will be able to write all the same
<18> s/root/SUPERUSER/ iirc
<16> You could fix that.
<15> will, http://pastebin.com/542562
<16> But that's why you don't use root to login./
<18> Mm?
<16> xiuan, I don't do pastebins.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#nvidia
gnome-game deb
Raymans Bowling
pspfocus
#mysql
#web
where is cups-config on ubuntu
#web
portsentry +ubuntu
#css



Home  |  disclaimer  |  contact  |  submit quotes