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