@# 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 18 19 20 21 22



Comments:

<0> i have been doing it that way for to long to bother changing.
<0> i can see joining here is going to reduce the amount of work im getting done today :/
<1> xahlee: why not just install DBI from cpan ?
<1> if you use the automated installer it includes DBD::mysql
<2> andrewbryson: i've alreaddy installed DBI (manually)
<2> am trying to install DBD::mysql manually now
<1> you can do something like perl -MCPAN -e 'install Bundle::DBI'
<1> and it will sort everything out for you
<2> in he config step it wants: for DBI with mysql, do i need Bundle::DBI or just DBI?
<2> oops...
<2> i meant to say: Can't exec "mysql_config": No such file or directory at Makefile.PL line 468.
<2> andrewbryson: you sure? because i thought it'll eventually nag about mysql_config
<1> it may do
<1> i always use cpan for installing modules though
<3> hello, do folks also know about maxdb here?
<1> works a treat most of the time



<2> what is mysql_config anyway?
<1> no idea sorry
<1> you do have mysql installed on the machine on which you are trying to install DBD::mysql don't you ?
<2> andrewbryson: yes
<2> andrewbryson: the client anyway.
<4> how would i specify a certain timezone in a select grabbing a datetime field?
<5> Hi People!
<1> there are people here ?
<6> xahlee: install the mysql dev package
<2> faljse: ah... someone is telling me about that.... that's on mysql site rigth?
<6> xahlee: that should be in your distribution
<7> I know I ask this all the time.... but what's the best way to store fixed decimals (i.e. currency) in a table?
<7> what type?
<7> anyone?
<1> i would store it as an integer
<8> you could use decimal(3,2) ...
<7> hmm
<7> decimal 5,2 should be cool eh?
<8> andrewbryson, why waste capasity to convert a decimal to an int?
<8> cpasity = cpu capisity
<1> convert what ?
<8> err... capasity
<7> hmmm :(
<5> I have a question: my database contains utf8 encoded text, but when run the following query http://pastebin.com/639501 the text is displayed incorrectly
<1> it is just a matter of working in the lowest currency unit
<7> this is just for a shipping matrix ....
<2> faljse: thanks a lot. installing.
<8> decimals could be 23.45 and if you want to save it as an int, then you would have to dup it with 100 first, and devide it when you want it back
<1> what are you talking about janhaa ?
<1> what has that to do with currency ?
<8> krisp's question.
<2> andrewbryson: cpan wants me to install wget! <groan>
<1> you don't have wget ?
<8> "fixed decimals"...?
<2> andrewbryson: os x comes with curl
<1> it should install everything for you
<1> cpan i mean
<1> and you will still need the dev thingos :P
<4> how would i specify a certain timezone in a select grabbing a datetime field?
<8> asidjazz, only if you must :P
<8> it's really up to you :)
<4> janhaa: i have to show the results in the current users stored timezone
<4> which i store in their settings
<4> when they signed up and chose it :)
<8> asidjazz, ok. then use the timezone if you want to have UTC time on every one of them.
<8> UTC, or whatever
<4> janhaa: so i have to store times in UTC?
<8> asidjazz, it's really up to you :/
<4> janhaa: how would i do that do i still use the DATETIME field?
<8> yes
<4> well right now theyre stored as the zone of the box
<4> which is like texas
<4> America/Texas
<4> (theplanet box)
<8> yeah, that's how i do it aswell.
<4> ok so then how do i pull the datetime in the timezone specified?
<4> i want it pulled for lets say America/Los_Angeles
<8> so every time you store is probably stored in texas-time. and the if you want to give back the users "real" time, then you must add the zoneinfo
<1> you could take an alternative approach and change the time zone on their computer to match the one that you are using
<1> then you could just display the datetimes as they are stored



<9> i made a script which converts databases with latin1 charset and utf8 data into utf8 charset. is there a place for stuff like that, i would like to contrib this
<8> andrewbryson, hehe. that sounds like a bad solution :/
<4> janhaa: right so how do i add the zone info
<1> :P
<4> janhaa: orr specify it upon the select
<8> CONVERT_TZ(dt,from_tz,to_tz) # use something like that
<8> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
<4> graci janhaa
<5> The guys from #php channel says, that my problem is caused by a disconnect in the client and server language setting, and to ask you how to fix this
<5> I use mysql 4.1
<8> asidjazz, SELECT CONVERT_TZ(my_date_time_col, '+07:00', timzone_col);
<8> ^ something like that
<4> hmm ok i need to figure out this server exact timezone
<4> it says CDT
<9> Szaszka: i missed the beginning. what is your problem?
<4> ,CONVERT_TZ(a.created,'America/Phoenix','America/Los_angeles') as created
<4> returns null
<1> that is because there is no time in america
<4> heh
<10> hi
<10> i forgot the root key of mysql server. what can i do?
<11> hi i have two sql servers working as primary and secondary backends to freeradius. sql1 is setup to be a master to sql2 and also to be a slave to sql2 and sql2 is set up the same
<11> clients look at sql1 if its down then they go to sql2
<11> the replication setup keeps sql2 in synch with sql1
<12> !m wfq reset root
<13> wfq: (How to Reset the Root P***word) : http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html
<10> SQL, thanks
<11> when sql1 comes backup it replicates and catches up on updates made to sql2
<11> then clients can start looking at sql1 againg
<11> where do i need to worry about race conditions?
<5> faber2: I have a question: my database contains utf8 encoded text, but when run the following query http://pastebin.com/639501 the text is displayed incorrectly
<4> ,CONVERT_TZ(a.created,'America/Phoenix','America/Los_angeles') as created
<4> f the time zone information tables in the mysql database have been created and populated, you can also use named time zones, such as 'Europe/Helsinki',
<9> Szaszka: you need to set the character set of your website to utf8.
<2> just install perl's DBI & DBD::mysql! thanks to andrewbryson & faljse
<9> USE: header("Content-type: text/html; charset=utf-8");
<14> hi
<9> Szaszka: also, make sure you run mysql_do("SET NAMES utf8") as the first command.
<5> faber2: it is set to utf8 and still don't work. Here's the example: http://88.209.192.251/test/test.php It should be look as this: http://88.209.192.251/test/test.php.1
<14> i've a question... is it possible to convert unix timestamp to DATE in mysql query?
<14> like SELECT timestamp, (...) WHERE datefield >= DATE(timestamp) ?
<9> Szaszka: you need to do the SET NAMES then
<5> faber2: I should run this command from the php srcipt? Here's my php script: http://pastebin.com/639501 Can you correct this script? (I'm not a php coder)
<9> gulldarek: check the mysql docs for the date functions. i am sure they have a conversion
<9> Szaszka: yes. put it in your php script as a mysql command
<9> Szaszka:
<9> sorry mysql_do is my own routine.
<9> use mysql_query("SET NAMES utf8")
<5> faber2: Ok, I'll give a try, and then write you. Thanks for help!
<9> Szaszka: no prob
<9> Szaszka: i have a sript which converts latin1/utf8 mysql to utf8, in case you need something like that
<15> is mysql's foreign key syntax somehow different?
<1> different to mysql ?
<15> no, from other databases'
<9> scarfboy: it does not work ;-)
<15> it should with innodb
<15> ...right?
<14> faber2: tm1.start <= FROM_UNIXTIME(matched.dateline, '%Y-%D-%M') :)
<4> janhaa: i figured it out how to use things like america/los_angeles
<14> faber2: thanks...
<4> janhaa: you have to import your local timeozneinfo like /usr/share/zoneinfo into the mysql db
<15> I apparently can't use phpmyadmin for foreign keys
<15> but ALTER TABLE error ADD FOREIGN KEY (database_id) REFERENCES database(id); also gives me an error
<9> scarfboy: yes, it works with innodb
<9> scarfboy: it should work. i am using it. check your syntax with the manual
<15> it does't give one for adding foreign keys
<15> ....figures:P
<15> just dropping them:P
<8> asidjazz, yeah...
<4> janhaa: only thing is dallas isnt a registered america/thingy
<4> so wtf else is in tx? :)
<8> i have no idea. ask multimap or something :P


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#osdev
smarthost mx sendmail brackets
kopete apt-get nightly
#perl
linuxant SIGHUP
gentoo project64 wine
iptables uid-owner smp
Vaio Specs for F580 -Battery -Picturebook -128MB -HP -ebay -adapter -prices
unknown option: log vim
#linux



Home  |  disclaimer  |  contact  |  submit quotes