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



Comments:

<plz_unban_e-PUNK> better use these consts or preprocessor aliases in ur code
<plz_unban_e-PUNK> it is better code than
<plz_unban_e-PUNK> better readable
<plz_unban_e-PUNK> cause the convention about the real values in diffrent programming languages differs
<plz_unban_e-PUNK> so in vba 0 is false and -1 is true
<plz_unban_e-PUNK> and eg -8 is bitwise (true true true)
<plz_unban_e-PUNK> no -7 is it
<plz_unban_e-PUNK> debboy?=
<plz_unban_e-PUNK> debboy?
<debboy> sorry back
<plz_unban_e-PUNK> read what i wrote!
<debboy> its ok, its not gone off the screen yet
<debboy> you are thinking about pure C, not C++
<debboy> there is no #define TRUE 1 in C++. there is proper 'true' and 'false' keywords.
<debboy> bool flag = true;
<plz_unban_e-PUNK> yes
<plz_unban_e-PUNK> thats not possible in c++?
<debboy> heres how it breaks down:
<debboy> int db_value = -72; (for example)
<plz_unban_e-PUNK> int is not bool
<debboy> bool cpp_value = db_value; cpp_value now = 1 or true
<debboy> so now, if you cout << "update table set column = 0 where column = " << cpp_value;
<debboy> you'll get "update table set column=0 where column=1" follow so far?
<plz_unban_e-PUNK> use: bool cpp_value = (bool)db_value
<debboy> plz_unban_e-PUNK, that will result in the same thing. cpp_value = 1.
<debboy> and thats ok, its just when you try and change it back to an SQL command, do you get problems. because that command (above) will not match any rows
<plz_unban_e-PUNK> ok and 1 is what in c++?
<plz_unban_e-PUNK> true or false?
<debboy> true
<plz_unban_e-PUNK> ok in vba it is true=-1
<plz_unban_e-PUNK> so maybe sql is like that too, or it as a diffrent convention
<plz_unban_e-PUNK> but if u cast to bool
<plz_unban_e-PUNK> it should work
<debboy> logically, ANY language regards true to be "not equal to zero". that includes the CPU in your computer.
<plz_unban_e-PUNK> nope its a question of definition
<debboy> again, the problem is this command: "update table set column=0 where column=1" will not work, because the existing row's value is -72, not '1'
<plz_unban_e-PUNK> thats what it does
<plz_unban_e-PUNK> and it is not a bug
<debboy> yup
<plz_unban_e-PUNK> so u have to improove your code: one way: allow only values 0 and 1
<plz_unban_e-PUNK> or a cast when read the values from the db
<plz_unban_e-PUNK> and when writing to
<debboy> yep
<plz_unban_e-PUNK> so did u try to save ur c++ trues as -1 in ur database?
<plz_unban_e-PUNK> than the sql logic function should work as well
<tibyke> moin
<debboy> sorry gotta hack a fix
<plz_unban_e-PUNK> ?
<e-PUNK2> .
<e-PUNK2> Therion, will, [RainMkr], arjenAU, HarrisonF, salle, will[werk], flipmcf, litheum, _RainMkr_, alphablue, GwaiLo, Leithal, Leith, Xgc, anybody there?
<salle> e-PUNK2: Anybody forgot to log in
<e-PUNK2> how do u mean?
<themolester> is there a way to order by the most recent select statement?
<lsmith> themolester: not really ..
<lsmith> sounds like a very odd requirement
<themolester> well my primaary reason is...
<themolester> i need to failover between ="search" LIKE"search" LIKE"search%" LIKE"%search%"
<themolester> and i also need it sorted... which is the step takes the most amount of time for my db
<themolester> any idea of a better way to do that?
<themolester> without sorting it 4 times?
<lsmith> you could fetch into a temp table
<lsmith> but i dont understand your issue
<lsmith> if you OR those searches, then only the left first matching one will be executed
<themolester> unfortunately... i THOUGHT it did that too
<themolester> i was mistaken
<themolester> what the multiple or ACTUALLY did... was make it so that any row that matched ANY of the results... would be allowed
<lsmith> could you pastebin your query
<zeitoun> themolester: of course. It does the 'OR' on each row, not for the entire query
<themolester> hrmm
<lsmith> also the sort for your first two variants should be fast if you have an index
<lsmith> only the last one will be expensive
<themolester> agreed... but whichever one matches... i need sorted
<themolester> i only want the most speciffic
<themolester> overall
<lsmith> the first two will come out sorted if you have an index anywaqys
<lsmith> so only the 3rd one will cause any sorting to be performed
<themolester> if theres ONE = match, i want it, if not, if theres ONE LIKE"search" i want that ... etc
<lsmith> do you have an index on the column?
<themolester> yes
<lsmith> then i do not see the problem
<lsmith> = "foo", LIKE "foo%"
<lsmith> both will use your index
<lsmith> and read the columns in index order
<zeitoun> themolester: select yourfield='search' as exactMatch, yourfield like 'search%' as beginMatch..... etc.... order by exactmatch, beginmatch.....
<themolester> zeitoun is that litteral? can you use where searches in the column selection part?
<zeitoun> themolester: of course
<themolester> hrmm... diddn't know that
<zeitoun> your can even use mysql command line as a calculator if your want: select 1+1 => 2
<themolester> yes, i knew that one
<zeitoun> select 'blabla' like %bla%' => 1
<themolester> but i figured where had to go after "WHERE"
<themolester> hehe
<themolester> lemme do a test and see if it does what im expecting
<themolester> all im getting is a bunch of 0s
<themolester> hrmm
<themolester> that actually takes longer than my current query
<themolester> very surprisingly
<themolester> or atleast AS long
<themolester> Query took 0.5085 sec
<themolester> my current one, which is a bunch of ORs takes 400-800s
<themolester> err
<themolester> ms
<themolester> 400-800ms
<themolester> collossal typeo
<themolester> heh
<ChrisDE> hi. can anyone tell me what the message "#2013 - Lost connection to MYSQL server during query" means? I'm trying to connect to mysql via phpmyadmin from another host....
<ChrisDE> is this a permission problem?
<csaba> It means you've lost connection to MYSQL server during query
<zeitoun> csaba: you beated me :)
<ChrisDE> so how to fix it csaba?
<themolester> nah, it means he caused the destruction of ancient egypt
<themolester> duhh
<csaba> ancient egypt was destroyed??
<themolester> cant you read between the lines
<themolester> csaba it is now ;-)
<ChrisDE> wer a sagt muß auch b sagen, csaba
<themolester> dunno actually... its ancient for a reason... some of it musta been destroyed
<themolester> ;-)
<zeitoun> ChrisDE: maybe check the mysql error log on the server and see if you have any interresting information there.
<csaba> ChrisDE: According to search.com (not google, they're evil): http://www.vbulletin.com/forum/showthread.php?t=34854
<ChrisDE> so if it was a permission problem... how could I fix it? is there anyting else to do beside GRANT ...
<themolester> ChrisDE we're just poking at you cause we're drowsy, and its 5am dont take offence...
<themolester> its fun
<themolester> :)
<ChrisDE> there is nothing in error.log, zeitoun
<csaba> ChrisDE: that post in the vbulletin forum was made by a Chris too :)
<csaba> Chris3G
<kryl> Hi
<csaba> I think this question will solve your problem:
<csaba> What is the value of the wait_timeout system variable in the MySQL server? (mysqladmin variables gives you the value of this variable.)
<csaba> Have you tried to run mysqld with the --log option to determine whether the problem query appears in the log?
<csaba> etc. found at http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
<kryl> I need to shut down a server for an upgrade, but I have a mysql database on this one. I can put an other server in place for this time, but I want to know how to sync database after that ? There is update, insert and delete sql request on the database.
<ChrisDE> csaba waittimeout is 28800
<e-PUNK2> ChrisDE: does it happen everytime u run the query?
<ChrisDE> I only try to connect from phpmyadmin to mysql... nothing else
<e-PUNK2> ChrisDE: is this the anwer to my question?
<zeitoun> kryl: is the database too big to copy over back and fourth ?
<ChrisDE> yes. everytime I try to connect
<zeitoun> ChrisDE: does this happen with a mysql command line client from the remote host as welll ?
<e-PUNK2> ok from another host, does it mean it works from some different host well?
<ChrisDE> I can connect from localhost typing mysql
<e-PUNK2> this works?
<ChrisDE> right. Also localhost can do queries...
<zeitoun> ChrisDE: can you do that from the remote host: mysql -h yourhost
<e-PUNK2> ok u have a right problem
<e-PUNK2> try that first
<e-PUNK2> zeitoun: good idea
<ChrisDE> ok, second... have to find a ssh login for that host first


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#bash
#python
jbalcomb
alsa gnome-light sound
apsx2
#osdev
avahi-compat-mDNSResponder conflicts with mDNSResponder-lib
non-root cpanplus
use cutecom
irc trolling fruitbag



Home  |  disclaimer  |  contact  |  submit quotes