@# 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> and xoops_online, only has a list of users online
<0> so not the offline users
<0> that sql statement returns all the users that belong to a clan with id 1
<1> if i am selecting several rows, is there anyway to p*** through the id of a given row into a sub query?
<2> I have data stored in DATETIME format. Is there a way that I can reformat the output of the DATETIME within the SELECT query?
<3> how would i do an insert into two tables in one query, and have the auto incremented id of one table as part of the insert into the other
<4> omebody can help me?
<5> ERROR 1064 at line 156: 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 'option varchar(50) NOT NULL default '',
<5> ordering int(11) NOT
<6> where can i find a good and simpel tutorial about database design and normalisation.
<7> DreamsZz: google!
<7> DreamsZz: i also remember a good article on that on dev.mysql.com
<6> let me check for that article on dev.mysql.com
<8> Is there a select function where mysql can search the db for a row that contains only a certain word?
<9> I recently upgraded from mysql 4.0 to 4.1.11 (debian stable), and now I have a query that no longer works. (I should note that I switched the default charset to utf-8): it is an enum field called level, and any query that tries to match on it fails, WHERE lvl = 'STAFF'
<9> note that STAFF is one of the enum options.



<9> if I change it to LVL LIKE 'STAFF' the query works. Not sure what is going on here.
<9> any ideas?
<3> like is a loose comparative
<9> hmm, I deleted the index on that field and now it works... very strange. Possible the index has some encoding issue.
<10> very likely
<4> guys
<4> for what when i create a user i see two grants with show grants?
<10> ECANNOTPARSE
<6> ERROR 1064 at line 21: 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 'DEFAULT CHARSET=latin8' at line 8 what kind of error is this and how can i solve this
<6> i am trying to create the world databse with the world.sql file from the mysql website
<11> what version of mysql are you using?
<6> let me check
<6> litheum: mysql Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (i486)
<12> DreamsZz: Something like: SELECT ... FROM table1 WHERE birthdate = date(now());
<11> that's old
<11> that's reeeeeeal old
<6> ehm this came with kubuntu breezy 5.1
<13> litheum: that's not nearly as old as the ES 3 boxes with 3.23.56 I still have to put up with.
<11> then kubuntu breezy 5.1 comes with a reeeeeeal old version of mysql
<11> TodoInTX: right you are
<12> DreamsZz: I thought you were going to sleep.
<6> yes i know Xgc, but this mysql so interesting to learn
<6> oke but litheum should i upgrade, and will the world.sql file work with an upgraded mysql version
<6> or how can i change the world.sql file so it will work on my system
<11> if you edit the world.sql thing tor emove that bit about the character set, it might work in 4.0
<11> but upgrading would be much better
<14> has anyone built up triggers/stored procedures to record changes to certain tables.... I don't wanna reinvent the wheel if someone knows
<13> jeffzz: what about the binary update log.
<14> TodoInTX, binary log .. records the queries
<14> i want to replicate a table based on the changes, not the SQL statements and the requirements to have every table on the slaves
<1> can i set 2 variables based on the result of a recordset?
<14> the only current way i can see is every 1/2 hour to ... select .. into outfile ... load data infile... into replicated database
<13> and a federated table won't for you work either.
<13> you need a read 2nd copy?
<15> hi TodoinTX
<13> jeffzz: that would be a "real" 2nd copy.
<13> alphablue: hey.
<15> i is in sat now
<14> TodoInTX, ya i have a real 2nd copy of a certain set of summary tables... but to build those tables, i need the master tables that won't fit on the slaves...
<14> so... it's replicating right now with a dbi hack , select info, insert in with dbi, it replicates...
<13> --replicate-do-table=db_name.tbl_name
<14> TodoInTX, yes but that still doesn't eliminate the requirement for the other tables
<14> you can't do... insert into replicated.table select * from master;
<14> it'll bitch about 'master'
<14> master needs to be on the slave
<15> jeffzz: play with find and -atime ?
<15> or you need to know exactly what was changed ?
<14> alphablue, out of 80M rows, i need to record which rows were modified in the past 2 weeks and make those available, anything else doesn't need to be 'live'
<14> so i replicate those statements.. and they get actively updated
<14> but where i have it normalized and all that
<14> the normalized tables cannot be put on the slaves
<14> so... i need a way to replicate without the master tables ... dbi is working but i periodically have to run a perl script
<12> DreamsZz: If you look at the world.sql file, you'll see the data was dumped from a database at version 4.1.13. You probably should upgrade at least to the latest version of 4.1,
<14> that makes sure the slave is caught up, executes a ****load of sql statements, and then cleans up on the master...
<15> i think there are commercial tools that will do what you need.. can't remember the name
<14> all to make a hackery of "changes to a table" ... if it recorded , and replicated the changes.. it would be awesome
<12> DreamsZz: It seems to load without errors into 5.0.x as well.
<15> jeffzz: do all rows have timestamps ? i think writing something custom for what you need is your best bet
<14> yes there are timestamps but i've approached that method..... best so far is the perl+dbi method
<14> that i'm using, i just wish I could get mysql to toggle the requirement of the master table...
<15> email brian



<11> !man server system variables
<16> (Server System Variables) : http://dev.mysql.com/doc/mysql/en/Server_system_variables.html
<14> for example : select * from table into outfile '....'; load data local infile '/...' insert into table replicated.table; <-- eliminates the need of the master table... HOWEVER, you should be able to : insert into replicated.table select SQL_REPLICATE_TABLE * from master;
<14> or something
<14> brian who?
<13> alphablue: I'm off till friday.
<15> TodoinTx: awesome. out of town ?
<15> brian aker
<13> no, that's my normal sched. p.s. Wed is keep the gl*** night a Flying Saucer.
<13> :)
<15> ahh cool :)
<15> it's been a while since i went back there
<13> alphablue: I have a friend that bartends there.
<15> do they still require their waitresses to have the ... "uniforms" ?
<13> ah... that's 1/2 the reason I keep comming back.
<15> hehe
<15> plus the offices are so darn close now
<15> hey were you around when Pickard came into town ?
<13> recently?
<15> i think late december/early jan
<13> I must have missed him then.
<14> not Scott Pickard ?
<15> i met him at a bar behind all stars.. galaxies ? i think.. he was a little toasty
<15> no, Jean Luc
<14> heh, i went to school with a Scott Pickard
<13> jeffzz: no, we're talking about John from San Antonio.
<13> sorry... I'm slow
<15> hehe
<15> slow/busy
<15> i'm procrastinating
<17> can someone tell me what the problem might be with this: $id_query = mysql_query("SELECT * FROM Meetings WHERE '$GroupName'=GroupName && '$Date'='Date'",$db);
<15> everything is opposite ?
<15> GroupName = $groupname .. and isn't Date a reserved word ?
<15> !tell us about reserved words
<16> But I don't know a thing about that.
<17> $mem_result = mysql_query("SELECT * FROM Members WHERE '$GroupName'=GroupName",$db); that one works
<10> use `Date`
<17> making me think the order was right
<12> DreamsZz: It's a pretty small (test) database. It only has 274 cities of the US and 4079 total cities of the world.
<10> and your where clause comparisons are backwards.
<17> add ` `
<13> http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
<17> ahh
<10> and don't name your columns after reserved words :b
<10> column types, etc.
<10> and while we're at it, ditch PHP ;)
<15> infi: hence the don't use date :)
<10> I know, I was reemphasizing it
<15> i know, but you also gave him a way out with the `Date`
<15> but either way
<4> mmm i dont understand
<4> any reason for can crete a table at command line and not from phpmyadmin ?
<15> the error message should tell you
<17> same error with $id_query = mysql_query("SELECT * FROM Meetings WHERE '$GroupName'=GroupName && '$MeetingDate'=MeetingDate",$db);
<4> i dont has a error message
<15> && ?
<17> You have an error in your SQL syntax near 'Resource id #2' at line 1
<15> try AND
<12> lsailor: Sounds like a PHP related error.
<17> same error with AND
<12> lsailor: One of those php variables expands to garbage.
<15> why are you using '$GroupName' = Groupname
<10> put the column names first anyway, dude.
<13> lsailor: actually the syntax is valid.
<13> it'
<12> infi: That's not the issue.
<13> it's just weird
<15> you can't have a column named $Groupname
<12> lsailor: You need to check your php variables.
<15> heh who made that syntax valid ?
<13> alphablue: you can have a string matched against a column though.
<15> yea i'm just reading it wrong
<13> mysql> select * from users where 'grape'=username;
<13> +--------+----------+----------+


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#css
Perl multiple matching Regexp
grub-remove
/dev/hdb mknod special 4
#bash
ubuntu server hel
force ubuntu boot text mode
#css
ubuntu realvnc native desktop
apt-get hping



Home  |  disclaimer  |  contact  |  submit quotes