@# 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> since its a count should do it by itself
<1> I think I messed up the mysql db...
<2> it isn't grouping -- it is overestimating the count
<3> MySQL/SQL Question and its probably a generic DB question. For some reason my auto_increment keys keep changing when backing up and restorting database backups, causing corruption. Ie on two different tables I have a user_id column, one might be users and one might be addresses. When I restore the user_id column on addresses will be out of order, causing lookups to be incorrect, ideas?
<4> iturk: the result set's pointer is *before* the first row. You need to call next() on it once to be able to access the first row.
<1> the table "db" has the user field with 6 chars... thats wrong... where can I find a correct mysql db structure?
<2> inviso_ -- so at the end, just put GROUP BY itemId?
<0> the point is that in that case there is no logis
<0> ligoc
<0> logic
<0> lol
<0> because my query only return one value
<4> iturk: also, catching exception and printing errors is bad style. throw exceptions if you can. catch as late as possible.
<0> its a count
<5> lorfds: basically, yes. group by gathers up rows for count/avg/min/max/etc. It's the basis for the aggregate functions
<4> iturk: it gets returned as a table with one row and one column. you need to call next() to get to the first row.



<0> i can do that later to the functions
<0> i dont need the first row
<4> it just makes my skin crawl when I see it.
<0> or second
<4> it causes unneccessary code
<0> my query is to all table
<0> yes i telling that my code is wrong
<0> i need just to get an integer that is the size of the table
<4> well, that'S what the query asks for.
<0> yes
<4> but...?
<0> the count in the query will return a number
<0> i just need to catch that number
<0> but how
<4> what??
<0> Select count(*) from online_services
<4> I told you: call rs.next() before rs.getXXX
<0> will return like 2 or 4
<4> a query *always* returns a table
<4> even if it's just a number
<0> ok i get the point
<4> you *always* need to move to the row you want to acces
<6> guy's I dont have mysqlhotcopy and I want to backup a db ..there another way without stopping the server
<7> mysqlhotcopy comes with mysql. Look harder, or use mysqldump.
<0> but the getInt needs a columm
<4> iturk: column 1
<0> and the query is for all the table
<0> what is the logic for p***ing column 1 or 2 if the query is for all the table
<6> mendel:I have looked ....it's not installed ... mysql 4.1.1a it's not there ???:(
<7> Then fix your broken installation.
<4> iturk: because it returns a table that contains *one* row and *one* column only.
<7> I can't make it appear for you. *It comes with MySQL*. Get it however you like. Or yuse mysqldump.
<7> use, too.
<6> mendel:I used a port to install
<4> iturk: because the result is just *one* number, but wrapped in a table.
<0> but if i want to perform it to all the table not only to one column
<4> .oO(i think i need to quit this channel).
<7> porkpie: Does not matter. It's your system, you're the sysadmin, getting it there correctly is your job. It comes with mysql. use that information however you wish.
<4> iturk: the query counts the number of rows in the table. the *result* has only one column.
<0> so the while will go on till next method finnish the i make p = rs.getInt("name");
<6> mendel:OK ....I will try and work out whats wrong
<0> i think there is not logic making p = rs.getInt("name"); because will go to the table and try to get the integer that is there
<0> inside the table not return by the query count
<8> zimnyx: no luck
<8> zimnyx: for some reason if i prepare a statement then php gets back scrambled data
<8> zimnyx: i tried changing all server vars from latin1 to utf8 and utf8_unicode_ci.
<0> Duesentrieb: other think if i use the while (rs.next()) {
<0> int p = rs.getInt("name");
<0> } i dont need to make the query count i can just iterate and use a variable int to count is that right ??
<9> Narada: mysql_query("SET NAMES 'utf8'") just after connecting
<0> Duesentrieb: if this is correct so the query count is not usefull since i can make a normal select * from table and count the number of lines of the table .. do you agree ??
<8> zimnyx: I'm not using that api; using PDO but I'll try that anyway. Can that be set in my.cnf?
<9> Narada: no, because it's on client side
<8> But there has to be default for all clients?
<9> Narada: try execute sql: show variables
<6> mendel:it looks like it was removed from the freebsd as a security issue
<9> Narada: client decides what it wants:)
<8> zimnyx: Did that; there was a whole bunch of stuff in latin1 or swedish
<1> Who can pastebin me the structure of "mysql" database, please?



<7> porkpie: That's dumb. Just get mysql from mysql.com instead of from ports.
<9> Narada: execute the "SET NAMES ..." query inside your app, can you?
<1> I got some strange stuff going on with the mysql structure
<8> zimnyx: doing now
<6> mendel:this is a live system .....can I download the script
<1> for example: table "db", field "User" is char(6)
<10> hi is there anyway I can make a sql query to search every table and colunm in a database to look for a term
<1> So there is a misconfiguration of the db structure... This started when I migrated to utf8 from iso
<8> zimnyx: can i do it within the sp i'm running
<1> Any help
<10> anyone
<6> can someone point me to the mysqlhotcopy perl script
<11> hi guys
<11> I know this question anoys people, but how do I set my next index to be a certain number?
<10> I want to search a whole database as in every column for any settings with my old domain name in them. is there any legal syntax for searching every field at once in the whole database?
<12> Razz3r: No
<10> G_SabinoMullane: so I will have to type in everything individually?
<13> hello!
<4> hi dammit :)
<14> dammit: nice nick.
<11> Where is the next index # (when using auto_increment) stored?
<9> Narada: sp?
<15> Renich you can get the last_inser_id()
<15> Renich you can get the last_insert_id()
<9> Can i use LIKE in join condition?
<8> zimnyx: stored procedure
<16> yes
<9> Narada: why?>
<11> thanks, archivist, but isn't it stored somewhere? I would like to change it, that's why
<8> zimnyx: http://pastebin.com/651881
<9> Narada: sorry, i mistook
<8> zimnyx: gives me back totally scrambled data
<9> i told you it's client charset
<15> Renich its best not to, but look at alter table if you REALLY REALLY have to
<9> no you can do it inside SP.
<9> Narada: no you can't do it inside SP.
<11> sure, thanks... the thing is that i'm doing some testing on a table, and, when I delete my testing data, I always get my next id very high... I only need to reset it to what it was when I started the testing
<11> archivist thanks for the info
<17> hi, how do i enable remote logins for only one domain name?
<18> if by domain name you mean by IP, then we're getting somewhere
<19> Wow, they make "power over ethernet" now...
<19> ZAP
<20> Howdy folks.
<8> zimnyx: no still scrambled data
<20> I'm trying to find out how to do a join where I have 3 tables. t1 = (c1, c2), t2 = (c3, c4), and t3 = (c5,c6). I wnat to do a select which selects every field where c3=c1 and c5=c1.
<8> Omg it's go... go..GODZIRRA! Arrrrghhhh!
<21> godzirra: dont still my ethnic speech impediment.
<21> s/still/steal
<20> heh
<17> sjrussel: sure. that'll work
<17> sjrussel: how do i do that? :)
<20> Anyone have any ideas or suggestions what to go read up on?
<20> Actually ideally I've got a table of devices, and of device_content_types and I need a csv file of devices and the content types they can use in one row.
<19> Write out as much of the SELECT as you can.
<20> but Ihave no idea how to do that.
<18> !m Jmax GRANT
<22> Jmax: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html
<18> !rtfm Jmax SELECT
<22> Nothing found.
<18> !m Jmax SELECT
<22> Jmax: (SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/SELECT.html
<17> sjrussel: i don't want to make it per-user
<21> select * from t1 inner join t2 on (t1.c1 = t1.c3) inner join t3 on (t3.c5 = t1.c1)
<18> then do it for every user
<17> no.
<18> then, use a firewall
<17> i want one ip to be able to login to my mysql as if it were localhost
<18> ...toobad?
<17> what?
<20> will: I was originally starting with this: select a.model, c.manufacturer, e.description from device as a, LEFT JOIN device_manufacturer as c on a.device_manufacturer_reference=c.reference JOIN device_content_type as b on a.reference=b.device_reference LEFT JOIN content_type as e on b.content_type_reference=e.reference limit 10;
<20> Horribly ugly.
<20> Crap, he left.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

ubuntu no screen found
libdvdcss ibook ubuntu
opentabs for ubuntu
#fedora
jugf,.kl
suse 10 enable dpms
Cernel Panic
dontzap ltsp
gentoo tg3 duplex
howto slow cyberblade fc5



Home  |  disclaimer  |  contact  |  submit quotes