@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> hey guys n gals just a quickie
<0> i am using VB to insert data into a mysql database...
<0> i wanna be able to state to only add data if the data in a certain field (drawnumber) doesn't already exist
<0> can i do this with a sql statement?
<0> or not
<1> WHERE clasue
<2> UPDATE table SET *row data here * WHERE drawnumber = NULL
<2> or something like that
<0> no im using a insert
<0> so that wouldnt work
<0> what i can do is query the db for the dranumber i am adding, if exaists then skip the adding code, but this means i am checking the DB everytime i add data, thought there may be a better way?
<1> mkae dranumber unique, then the insert will fail if its a duplicate
<0> how do i make it unique?
<0> at the moment it is just set as integer?
<1> www.mysql.com



<2> unique is a typing of index
<2> if you don't know what indexes are... you really need to visit mysql.com
<2> if i had like $3k to just blow, i'd be playing with OSX on a shiney new MacBook Pro
<2> heh
<2> but alas, i know i'll end up settling for a $1k-ish PC laptop and linux
<0> ok, i have set a new index (i think) went into indices, added new index, set the index kind to unique, and set index columns for that to drawnumber
<2> thats the idea :)
<0> so now when i add dupliate data i get an error saying "Duplicate entry for key2"
<1> so procces the error
<0> is there anyway of turning off the errors, so they dont get p***ed back and it just resumes what it was doing?
<1> yup
<0> how?
<1> well in vb i dont know
<0> no in sql i mean?
<1> its not a mysql issue
<0> ok
<1> let it issue the error and vb supress it
<0> i wil
<0> all done, thanks
<0> one more question if you wouldn't mind sharing your wisdom
<0> i have a field called DATETIME which is set as "DATETIME", the default value is 0000-00-00 00:00:00
<0> rather than me generatin the date and time stamp, can i get mysql to do this everytime i insert a new record?
<0> like insert into mydb (datetime)value(sqldatetimestamp)
<1> Defult it to CURRENT_TIMESTAMP
<1> im a timestamp field
<1> it will be added automaticlly
<0> brill.. thx
<0> i ***ume that this cannot be in quotes?
<3> hello is there a way to update a record just increment it by one without getting the record first and add 1 to it manually?
<4> morning
<4> zzZZzz
<5> hello
<4> hello
<5> hoe can i switch the value (set 0 if current is 1 and 1 of currently 0)?
<5> is it possible with one query?
<4> can t help sorry
<4> i am sure if you waited enough some one will do
<6> hi.. when im doing an insert, i have some javascript code that has ' in it which break the insert. how can i keep the ' in and still insert?
<4> \'
<6> bam!
<6> thanks man... i thought i tried that and it broke the js
<6> its good
<6> sweet
<7> beebum: it is working now, isn't it=
<7> ?
<4> wb
<8> heay
<8> heya*
<4> sup
<8> hehe
<9> K_F, no. when i click on the Publish button i still get the error. :(
<8> hmm, odd
<8> checking into it right now
<9> should i log out?
<8> http://beebum.kfwebs.com/?p=12
<9> ?
<9> heh, i still get the error
<8> try to clear the temporary internet files
<8> which browser is it?



<9> firefox
<8> hmm, 1.5.0.1 here
<9> still doesn't work. i've never had this problem before :(
<9> 1.0.7
<8> should upgrade anyways then, who knows might solve it
<8> but what is the error?
<9> Forbidden
<9> You don't have permission to access /wp-admin/post.php on this server.
<9> Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
<8> care to send me what you want added in a private message?
<9> ok
<9> Many people are trying to use tools like sed and awk on html files and aren't realy concerned about the code, they just want the content. With all the code in html file, this can be very difficult. However, by using the <a href="http://tyson.homeunix.org/scripts/lynx_dump">-dump</a>; option in lynx, you can get text that is much easier to work with.
<9> crap
<9> sorry about that
<8> was the use of "dump" in the title
<9> yes
<8> as in, thats why it got blocked
<9> ah
<9> the title was "lynx -dump"
<8> which doesn't work
<8> however same with a title "lynx" works
<9> ah, i see
<9> thanks for the help ;)
<8> no problem.
<9> sorry for posting all that crap in here
<8> not too much
<8> would have been worse if it was one of my articles :)
<9> heh
<8> I showed you my deutsche mark, right?
<9> no
<8> http://www.kfwebs.net/articles/article/32/Hyper-inflation+in+Germany+1923
<8> I got 7 billion 10 million DM
<8> could probably get some bread with it :)
<9> interesting
<9> ;)
<8> I'm a finance geek, I can't help it
<8> writing on http://www.kfwebs.net/articles/article/33/Protect+yourself+from+identity+theft now
<9> that'll be a good article to read
<8> not more than my general crypto mumble
<8> just a little different angle
<9> we need to look at things from different angle because the bad guys are always inventing new angles of attack
<8> I mean from me to write on, a little more basics and no c=m^e Mod N stuff
<9> heh
<8> that is the RSA encryption formula by the way
<8> not that it is that interesting
<8> anyways..
<9> ;)
<9> hey, A-list blogger (K_F) why aren't i (C-list blogger) listed in your blogroll? ;D
<8> hehe
<8> http://www.kfwebs.net/links/ <- you're listed at the left here though
<8> but I'll add you to the blogroll as well :)
<8> done
<9> heh, cool ;)
<9> wow, top of the list ;D
<8> it roll, doesn't it?
<8> :)
<9> heh, yes
<8> I mean, hence the term blog-roll
<9> i'm catching up. just takes me a while sometimes
<8> hehe
<9> sinserly, C-list blogger ;)
<8> it is a nice comic, right?
<9> yes, i love it
<8> not that I'd call myself an A-list blogger
<9> not too shabby tho
<8> kfwebs.net only had 20,000 unique visitors in february
<9> not sure anyone visits mine
<8> 20120 to be exact
<8> you have logs you know
<8> http://72.29.83.156:2082/awstats.pl?config=beebum.kfwebs.com&lang=en
<8> 24 unique visitors last month
<9> can't log in
<8> I don't remember your p***word
<8> let me reset it :)


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#linux
carlos@ubuntu
#php
#AllNiteCafe
#php
#linux
#mirc
#linux
#php
granting priviledges in mysql



Home  |  disclaimer  |  contact  |  submit quotes